diff options
author | hobbs <hobbs> | 2002-06-22 09:13:37 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-06-22 09:13:37 (GMT) |
commit | 960b3598fca775d3d33ceb3fbe88469d8760164e (patch) | |
tree | 568826424534244025ec2380eadc5e498c280cd9 /generic | |
parent | 50ffb27e543f03f03d46bf14100468caf43544b6 (diff) | |
download | tk-960b3598fca775d3d33ceb3fbe88469d8760164e.zip tk-960b3598fca775d3d33ceb3fbe88469d8760164e.tar.gz tk-960b3598fca775d3d33ceb3fbe88469d8760164e.tar.bz2 |
* generic/tkFont.c (TkFontPkgFree): changed panic on freeing fonts
to an assert, and wrapped panic in #ifdef PURIFY. [Bug #568701]
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkFont.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c index 2643b1f..5ab4e46 100644 --- a/generic/tkFont.c +++ b/generic/tkFont.c @@ -11,13 +11,17 @@ * 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.13 2002/01/17 05:13:11 dgp Exp $ + * RCS: @(#) $Id: tkFont.c,v 1.14 2002/06/22 09:13:37 hobbs Exp $ */ #include "tkPort.h" #include "tkInt.h" #include "tkFont.h" +#ifndef assert +#include <assert.h> +#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 @@ -435,9 +439,12 @@ TkFontPkgFree(mainPtr) fprintf(stderr, "Font %s still in cache.\n", Tcl_GetHashKey(&fiPtr->fontCache, searchPtr)); } + assert(fontsLeft == 0); +#ifdef PURIFY if (fontsLeft) { panic("TkFontPkgFree: all fonts should have been freed already"); } +#endif Tcl_DeleteHashTable(&fiPtr->fontCache); hPtr = Tcl_FirstHashEntry(&fiPtr->namedTable, &search); |