summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-11-04 14:39:00 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-11-04 14:39:00 (GMT)
commit9483c91f1b6ce1bb5f1cd5314507f42737e5899e (patch)
treea875311bc2adc338c5e95c8cc07d4e88a7e49edc
parentb48d11bb4ce7931c2ee17f9a51be8c232d306f10 (diff)
parent9b1aff22243a1fd3f18fe640ebe06ea226b0f848 (diff)
downloadtcl-9483c91f1b6ce1bb5f1cd5314507f42737e5899e.zip
tcl-9483c91f1b6ce1bb5f1cd5314507f42737e5899e.tar.gz
tcl-9483c91f1b6ce1bb5f1cd5314507f42737e5899e.tar.bz2
close fork
-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);