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 771347d..bc2b7c4 100644
--- a/generic/tkTextImage.c
+++ b/generic/tkTextImage.c
@@ -779,6 +779,10 @@ TkTextImageIndex(
Tcl_HashEntry *hPtr;
TkTextSegment *eiPtr;
+ if (textPtr == NULL) {
+ return 0;
+ }
+
hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->imageTable, name);
if (hPtr == NULL) {
return 0;