summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-07-07 20:39:50 (GMT)
committerhobbs <hobbs>2003-07-07 20:39:50 (GMT)
commit79cd5a9af9f30aa8390a5df0a1a0fada20a374d3 (patch)
treefc3e2167d2cebf5bb57470a5f17515b6d2eee394 /generic
parentbac92cbfb391c2766bfaed11eb16bd73abbed30a (diff)
downloadtk-79cd5a9af9f30aa8390a5df0a1a0fada20a374d3.zip
tk-79cd5a9af9f30aa8390a5df0a1a0fada20a374d3.tar.gz
tk-79cd5a9af9f30aa8390a5df0a1a0fada20a374d3.tar.bz2
* generic/tkTextDisp.c (DisplayText): correct use of textPtr data
with respect to Tcl_Release time. [Bug #767009]
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextDisp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index f94281d..48f2963 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.16 2003/05/27 15:35:53 vincentdarley Exp $
+ * RCS: @(#) $Id: tkTextDisp.c,v 1.17 2003/07/07 20:39:50 hobbs Exp $
*/
#include "tkPort.h"
@@ -2179,7 +2179,6 @@ DisplayText(clientData)
{
register TkText *textPtr = (TkText *) clientData;
TextDInfo *dInfoPtr = textPtr->dInfoPtr;
- Tk_Window tkwin;
register DLine *dlPtr;
DLine *prevPtr;
Pixmap pixmap;
@@ -2244,16 +2243,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 ((textPtr->tkwin == NULL) || (textPtr->flags & DESTROYED)) {
+ Tcl_Release((ClientData) textPtr);
goto end;
}
+ Tcl_Release((ClientData) textPtr);
}
/*