From 79cd5a9af9f30aa8390a5df0a1a0fada20a374d3 Mon Sep 17 00:00:00 2001 From: hobbs Date: Mon, 7 Jul 2003 20:39:50 +0000 Subject: * generic/tkTextDisp.c (DisplayText): correct use of textPtr data with respect to Tcl_Release time. [Bug #767009] --- ChangeLog | 5 +++++ generic/tkTextDisp.c | 9 +++------ 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 + + * generic/tkTextDisp.c (DisplayText): correct use of textPtr data + with respect to Tcl_Release time. [Bug #767009] + 2003-07-07 Donal K. Fellows * 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); } /* -- cgit v0.12