summaryrefslogtreecommitdiffstats
path: root/generic/tkTextDisp.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-05-27 15:35:52 (GMT)
committervincentdarley <vincentdarley>2003-05-27 15:35:52 (GMT)
commit72a139a4ee101796fcc487b5b3bba46295f13b8c (patch)
tree2b0f643f9180be5a8850e6ce4a100f39000a42cf /generic/tkTextDisp.c
parente8d261532f654e15e81a8d3e0f4ad562d7382e8c (diff)
downloadtk-72a139a4ee101796fcc487b5b3bba46295f13b8c.zip
tk-72a139a4ee101796fcc487b5b3bba46295f13b8c.tar.gz
tk-72a139a4ee101796fcc487b5b3bba46295f13b8c.tar.bz2
text widget cleanup fix
Diffstat (limited to 'generic/tkTextDisp.c')
-rw-r--r--generic/tkTextDisp.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 6c9f7fc..f94281d 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTextDisp.c,v 1.15 2003/05/19 13:04:23 vincentdarley Exp $
+ * RCS: @(#) $Id: tkTextDisp.c,v 1.16 2003/05/27 15:35:53 vincentdarley Exp $
*/
#include "tkPort.h"
@@ -2188,7 +2188,7 @@ DisplayText(clientData)
* compiler warnings. */
Tcl_Interp *interp;
- if (textPtr->tkwin == NULL) {
+ if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
/*
* The widget has been deleted. Don't do anything.
@@ -2205,7 +2205,7 @@ DisplayText(clientData)
TCL_GLOBAL_ONLY);
}
- if (textPtr->tkwin == NULL) {
+ if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
/*
* The widget has been deleted. Don't do anything.
@@ -2226,7 +2226,7 @@ DisplayText(clientData)
TCL_GLOBAL_ONLY);
}
- if (textPtr->tkwin == NULL) {
+ if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
/*
* The widget has been deleted. Don't do anything.
@@ -2244,12 +2244,14 @@ DisplayText(clientData)
*/
while (dInfoPtr->flags & REPICK_NEEDED) {
+ int flags = textPtr->flags;
+
Tcl_Preserve((ClientData) textPtr);
dInfoPtr->flags &= ~REPICK_NEEDED;
TkTextPickCurrent(textPtr, &textPtr->pickEvent);
tkwin = textPtr->tkwin;
Tcl_Release((ClientData) textPtr);
- if (tkwin == NULL) {
+ if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
goto end;
}
}
@@ -2494,7 +2496,7 @@ DisplayText(clientData)
TCL_GLOBAL_ONLY|TCL_APPEND_VALUE|TCL_LIST_ELEMENT);
}
- if (textPtr->tkwin == NULL) {
+ if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
/*
* The widget has been deleted. Don't do anything.
@@ -2524,7 +2526,7 @@ DisplayText(clientData)
GetYView(textPtr->interp, textPtr, 1);
}
- if (textPtr->tkwin == NULL) {
+ if ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
/*
* The widget has been deleted. Don't do anything.