summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorgahr <gahr@gahr.ch>2016-11-04 14:24:42 (GMT)
committergahr <gahr@gahr.ch>2016-11-04 14:24:42 (GMT)
commit1883f78e304e392f35017905a9e9ddd33d0bc7eb (patch)
tree8b6569ce3c6749ab05b8c35234796427e6c8dc58 /generic
parent2ed49a3c8102564e96352e3b8cc77f234adcae6e (diff)
parent6f7ca1db34f65411ee5779dcab9c0a0255adb713 (diff)
downloadtcl-1883f78e304e392f35017905a9e9ddd33d0bc7eb.zip
tcl-1883f78e304e392f35017905a9e9ddd33d0bc7eb.tar.gz
tcl-1883f78e304e392f35017905a9e9ddd33d0bc7eb.tar.bz2
merge core-8-5-branch ([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 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);