summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-11-04 14:42:14 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-11-04 14:42:14 (GMT)
commit6305a931335f3d309db7906c7c9a1022839ed6c5 (patch)
treed36dc82daa11f3cc2888d7524062a332ec1d5483
parentcd20c7f1264dbe0f5a4534dbe5e0e577b6866d57 (diff)
parent1883f78e304e392f35017905a9e9ddd33d0bc7eb (diff)
downloadtcl-6305a931335f3d309db7906c7c9a1022839ed6c5.zip
tcl-6305a931335f3d309db7906c7c9a1022839ed6c5.tar.gz
tcl-6305a931335f3d309db7906c7c9a1022839ed6c5.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);