summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2003-07-07 20:39:50 (GMT)
committerhobbs <hobbs>2003-07-07 20:39:50 (GMT)
commit74c1ef249d7327dff4230fd8a38c166805eb02d1 (patch)
treefc3e2167d2cebf5bb57470a5f17515b6d2eee394
parentc99c98d07d3bd68e45084367b4192747ce420fe3 (diff)
downloadtk-74c1ef249d7327dff4230fd8a38c166805eb02d1.zip
tk-74c1ef249d7327dff4230fd8a38c166805eb02d1.tar.gz
tk-74c1ef249d7327dff4230fd8a38c166805eb02d1.tar.bz2
* generic/tkTextDisp.c (DisplayText): correct use of textPtr data
with respect to Tcl_Release time. [Bug #767009]
-rw-r--r--ChangeLog5
-rw-r--r--generic/tkTextDisp.c9
2 files changed, 8 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index e61842b..826a7bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-07-07 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * generic/tkTextDisp.c (DisplayText): correct use of textPtr data
+ with respect to Tcl_Release time. [Bug #767009]
+
2003-07-07 Donal K. Fellows <fellowsd@cs.man.ac.uk>
* generic/tkImage.c (TkDeleteAllImages,etc.): Stopped the deleting
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);
}
/*