summaryrefslogtreecommitdiffstats
path: root/generic/tclLiteral.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-05 13:57:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-05 13:57:49 (GMT)
commitb2416bd570c3cc5431441c91207dd443e15b3689 (patch)
tree292b0361e6fc21f01fa3b3f31dbbf0fa00658840 /generic/tclLiteral.c
parentc69560787b8c49c748c57de234548e3ba29635d5 (diff)
parentc4b6cab579135a425ee76831a12791d16bf5dde5 (diff)
downloadtcl-b2416bd570c3cc5431441c91207dd443e15b3689.zip
tcl-b2416bd570c3cc5431441c91207dd443e15b3689.tar.gz
tcl-b2416bd570c3cc5431441c91207dd443e15b3689.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclLiteral.c')
-rw-r--r--generic/tclLiteral.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/tclLiteral.c b/generic/tclLiteral.c
index 3864ad5..de299d4 100644
--- a/generic/tclLiteral.c
+++ b/generic/tclLiteral.c
@@ -431,12 +431,13 @@ TclRegisterLiteral(
* Is it in the interpreter's global literal table? If not, create it.
*/
+ globalPtr = NULL;
objPtr = TclCreateLiteral(iPtr, bytes, length, hash, &new, nsPtr, flags,
&globalPtr);
objIndex = AddLocalLiteralEntry(envPtr, objPtr, localHash);
#ifdef TCL_COMPILE_DEBUG
- if (globalPtr->refCount < 1) {
+ if (globalPtr != NULL && globalPtr->refCount < 1) {
Tcl_Panic("%s: global literal \"%.*s\" had bad refCount %d",
"TclRegisterLiteral", (length>60? 60 : length), bytes,
globalPtr->refCount);