summaryrefslogtreecommitdiffstats
path: root/generic/tkTextIndex.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkTextIndex.c')
-rw-r--r--generic/tkTextIndex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkTextIndex.c b/generic/tkTextIndex.c
index d227bd8..faa1afd 100644
--- a/generic/tkTextIndex.c
+++ b/generic/tkTextIndex.c
@@ -87,7 +87,7 @@ FreeTextIndexInternalRep(
TkTextIndex *indexPtr = GET_TEXTINDEX(indexObjPtr);
if (indexPtr->textPtr != NULL) {
- if (--indexPtr->textPtr->refCount == 0) {
+ if (indexPtr->textPtr->refCount-- <= 1) {
/*
* The text widget has been deleted and we need to free it now.
*/