diff options
author | gahr <gahr@gahr.ch> | 2016-11-04 14:21:04 (GMT) |
---|---|---|
committer | gahr <gahr@gahr.ch> | 2016-11-04 14:21:04 (GMT) |
commit | 6f7ca1db34f65411ee5779dcab9c0a0255adb713 (patch) | |
tree | 158e8580178396ed38be8190fbd13ad6f8580ce3 | |
parent | 39bf6f7c801c908cc4fff7f87e191d13f14937df (diff) | |
download | tcl-6f7ca1db34f65411ee5779dcab9c0a0255adb713.zip tcl-6f7ca1db34f65411ee5779dcab9c0a0255adb713.tar.gz tcl-6f7ca1db34f65411ee5779dcab9c0a0255adb713.tar.bz2 |
[824752f10e] Avoid calling Tcl_SetObjResult if interp is NULL
-rw-r--r-- | generic/tclListObj.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c index c4b5cfc..22f1960 100644 --- a/generic/tclListObj.c +++ b/generic/tclListObj.c @@ -855,8 +855,11 @@ Tcl_ListObjReplace( } if (objc > LIST_MAX - (numElems - count)) { - Tcl_SetObjResult(interp, Tcl_ObjPrintf( - "max length of a Tcl list (%d elements) exceeded", LIST_MAX)); + if (interp != NULL) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "max length of a Tcl list (%d elements) exceeded", + LIST_MAX)); + } return TCL_ERROR; } isShared = (listRepPtr->refCount > 1); |