diff options
author | dgp <dgp@users.sourceforge.net> | 2016-11-04 14:42:14 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-11-04 14:42:14 (GMT) |
commit | 6305a931335f3d309db7906c7c9a1022839ed6c5 (patch) | |
tree | d36dc82daa11f3cc2888d7524062a332ec1d5483 | |
parent | cd20c7f1264dbe0f5a4534dbe5e0e577b6866d57 (diff) | |
parent | 1883f78e304e392f35017905a9e9ddd33d0bc7eb (diff) | |
download | tcl-6305a931335f3d309db7906c7c9a1022839ed6c5.zip tcl-6305a931335f3d309db7906c7c9a1022839ed6c5.tar.gz tcl-6305a931335f3d309db7906c7c9a1022839ed6c5.tar.bz2 |
close fork
-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 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); |