summaryrefslogtreecommitdiffstats
path: root/generic/tkTextWind.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextWind.c')
-rw-r--r--generic/tkTextWind.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/generic/tkTextWind.c b/generic/tkTextWind.c
index ecafd4e..5dc8feb 100644
--- a/generic/tkTextWind.c
+++ b/generic/tkTextWind.c
@@ -1329,6 +1329,10 @@ TkTextWindowIndex(
Tcl_HashEntry *hPtr;
TkTextSegment *ewPtr;
+ if (textPtr == NULL) {
+ return 0;
+ }
+
hPtr = Tcl_FindHashEntry(&textPtr->sharedTextPtr->windowTable, name);
if (hPtr == NULL) {
return 0;