summaryrefslogtreecommitdiffstats
path: root/generic/tclLiteral.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-05 13:56:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-09-05 13:56:15 (GMT)
commitf64a3b8559e5f75f1e208503090cf2503a197470 (patch)
tree2736a9a0c4ef761f3a90633788330f1d7db8bc67 /generic/tclLiteral.c
parent5eb346e0d25b2ae446797b610058911dc3b65a63 (diff)
parent8dac135fc9c8efae2cc3113bc975ab871ff2271f (diff)
downloadtcl-f64a3b8559e5f75f1e208503090cf2503a197470.zip
tcl-f64a3b8559e5f75f1e208503090cf2503a197470.tar.gz
tcl-f64a3b8559e5f75f1e208503090cf2503a197470.tar.bz2
merge core-8-6-branch
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 e0425cf..9f01144 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);