From 406c7254eb663e519e34e440ce87c0641001ee9d Mon Sep 17 00:00:00 2001 From: mdejong Date: Tue, 16 Jul 2002 23:29:33 +0000 Subject: * generic/tkFont.c (TkFontPkgFree): Call panic instead of assert since assert is not used in the rest of Tk. [Tk bug 579651] --- ChangeLog | 6 ++++++ generic/tkFont.c | 9 +++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 090d974..453b1ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2002-07-16 Mo DeJong + * generic/tkFont.c (TkFontPkgFree): Call panic instead + of assert since assert is not used in the rest of Tk. + [Tk bug 579651] + +2002-07-16 Mo DeJong + * unix/Makefile.in: * win/Makefile.in: Add a more descriptive warning in the event `make genstubs` needs to be rerun. diff --git a/generic/tkFont.c b/generic/tkFont.c index 31571d1..06fa261 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -11,17 +11,13 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkFont.c,v 1.16 2002/06/26 22:12:43 a_kovalenko Exp $ + * RCS: @(#) $Id: tkFont.c,v 1.17 2002/07/16 23:29:33 mdejong Exp $ */ #include "tkPort.h" #include "tkInt.h" #include "tkFont.h" -#ifndef assert -#include -#endif - /* * The following structure is used to keep track of all the fonts that * exist in the current application. It must be stored in the @@ -439,7 +435,8 @@ TkFontPkgFree(mainPtr) fprintf(stderr, "Font %s still in cache.\n", Tcl_GetHashKey(&fiPtr->fontCache, searchPtr)); } - assert(fontsLeft == 0); + if (fontsLeft == 0) + panic("no fontsLeft"); #ifdef PURIFY if (fontsLeft) { panic("TkFontPkgFree: all fonts should have been freed already"); -- cgit v0.12