summaryrefslogtreecommitdiffstats
path: root/generic/tkTextImage.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextImage.c')
-rw-r--r--generic/tkTextImage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tkTextImage.c b/generic/tkTextImage.c
index 1770cb6..4a98d42 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.c
@@ -786,6 +786,10 @@ TkTextImageIndex(
Tcl_HashEntry *hPtr;
TkTextSegment *eiPtr;
+ if (textPtr == NULL) {
+ return 0;
+ }
+
hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->imageTable, name);
if (hPtr == NULL) {
return 0;