summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgahr <gahr@gahr.ch>2016-11-04 14:23:43 (GMT)
committergahr <gahr@gahr.ch>2016-11-04 14:23:43 (GMT)
commit9b1aff22243a1fd3f18fe640ebe06ea226b0f848 (patch)
tree0fd232bfd488745d2d003ec91ca6c538c4ae747d
parentba52e2e1c7f3ffc066c415f6f224922e698bed00 (diff)
parent6f7ca1db34f65411ee5779dcab9c0a0255adb713 (diff)
downloadtcl-9b1aff22243a1fd3f18fe640ebe06ea226b0f848.zip
tcl-9b1aff22243a1fd3f18fe640ebe06ea226b0f848.tar.gz
tcl-9b1aff22243a1fd3f18fe640ebe06ea226b0f848.tar.bz2
merge core-8-5-branch ([824752f10e] Avoid calling Tcl_SetObjResult if interp is NULL)
-rw-r--r--generic/tclListObj.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index 14b8a14..2929423 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -907,8 +907,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);