summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-13 10:57:09 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-13 10:57:09 (GMT)
commitadcaff51ac47153e4fd3ff2dd206c0c03271ef04 (patch)
tree16f1c5462d7784e6e404532c4afe9a83213e0888 /generic
parentf1752f51c91fe99938a7cc83ea61e37feeea9209 (diff)
parent4d561210e91f94161688da0a87616ff34a6a7fcf (diff)
downloadtcl-adcaff51ac47153e4fd3ff2dd206c0c03271ef04.zip
tcl-adcaff51ac47153e4fd3ff2dd206c0c03271ef04.tar.gz
tcl-adcaff51ac47153e4fd3ff2dd206c0c03271ef04.tar.bz2
Merge 8.6
Diffstat (limited to 'generic')
-rw-r--r--generic/tclIndexObj.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index c2812ea..5e44a9c 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -261,7 +261,7 @@ Tcl_GetIndexFromObjStruct(
int offset, /* The number of bytes between entries */
const char *msg, /* Identifying word to use in error
* messages. */
- int flags, /* 0 or TCL_EXACT */
+ int flags, /* 0, TCL_EXACT or TCL_INDEX_TEMP_TABLE */
int *indexPtr) /* Place to store resulting integer index. */
{
int index, idx, numAbbrev;
@@ -280,7 +280,7 @@ Tcl_GetIndexFromObjStruct(
* See if there is a valid cached result from a previous lookup.
*/
- if (!(flags & TCL_INDEX_TEMP_TABLE)) {
+ if (objPtr && !(flags & TCL_INDEX_TEMP_TABLE)) {
irPtr = TclFetchInternalRep(objPtr, &indexType);
if (irPtr) {
indexRep = (IndexRep *)irPtr->twoPtrValue.ptr1;
@@ -296,7 +296,7 @@ Tcl_GetIndexFromObjStruct(
* abbreviations unless TCL_EXACT is set in flags.
*/
- key = TclGetString(objPtr);
+ key = objPtr ? TclGetString(objPtr) : "";
index = -1;
numAbbrev = 0;
@@ -344,7 +344,7 @@ Tcl_GetIndexFromObjStruct(
* operation.
*/
- if (!(flags & TCL_INDEX_TEMP_TABLE)) {
+ if (objPtr && !(flags & TCL_INDEX_TEMP_TABLE)) {
irPtr = TclFetchInternalRep(objPtr, &indexType);
if (irPtr) {
indexRep = (IndexRep *)irPtr->twoPtrValue.ptr1;