From 3bdb973764ec36da1e05c457c564a66210d9de52 Mon Sep 17 00:00:00 2001 From: vincentdarley Date: Wed, 5 Apr 2006 17:16:28 +0000 Subject: fix to crash in test suite, with dump -command --- ChangeLog | 6 ++++++ generic/tkText.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 827078c..4316841 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-04-05 Vince Darley + + * generic/tkText.c: fix to crash caused on some platforms + by new tests introduced to check for [Bug 1414171], which + destroy the text widget in the dump callback script. + 2006-03-29 Jeff Hobbs * generic/tkOption.c (TkOptionDeadWindow): handle diff --git a/generic/tkText.c b/generic/tkText.c index fb45e66..aeb40bb 100644 --- a/generic/tkText.c +++ b/generic/tkText.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkText.c,v 1.67 2006/03/28 19:26:52 vincentdarley Exp $ + * RCS: @(#) $Id: tkText.c,v 1.68 2006/04/05 17:16:29 vincentdarley Exp $ */ #include "default.h" @@ -4803,7 +4803,8 @@ DumpSegment(textPtr, interp, key, value, command, index, what) list = Tcl_Merge(3, argv); Tcl_VarEval(interp, Tcl_GetString(command), " ", list, NULL); ckfree(list); - if (TkBTreeEpoch(textPtr->sharedTextPtr->tree) != oldStateEpoch) { + if ((textPtr->flags & DESTROYED) + || (TkBTreeEpoch(textPtr->sharedTextPtr->tree) != oldStateEpoch)) { return 1; } else { return 0; -- cgit v0.12