summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorgahr <gahr@gahr.ch>2016-11-04 14:21:04 (GMT)
committergahr <gahr@gahr.ch>2016-11-04 14:21:04 (GMT)
commit452f14ebb5d1e5cb38c29285d7c33679c7066e15 (patch)
tree158e8580178396ed38be8190fbd13ad6f8580ce3 /generic
parenta7e97de50ac5b10d761ec5b544a8f7c7ae47f213 (diff)
downloadtcl-452f14ebb5d1e5cb38c29285d7c33679c7066e15.zip
tcl-452f14ebb5d1e5cb38c29285d7c33679c7066e15.tar.gz
tcl-452f14ebb5d1e5cb38c29285d7c33679c7066e15.tar.bz2
[824752f10e] Avoid calling Tcl_SetObjResult if interp is NULL
Diffstat (limited to 'generic')
-rw-r--r--generic/tclListObj.c7
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);