diff options
author | hobbs <hobbs> | 2002-06-22 09:13:37 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-06-22 09:13:37 (GMT) |
commit | 29fcd9fc6057ab5592252be5af5a2481d4704c3f (patch) | |
tree | 568826424534244025ec2380eadc5e498c280cd9 /generic | |
parent | 83e17b5b5be1386d8660266be3481ea936af9527 (diff) | |
download | tk-29fcd9fc6057ab5592252be5af5a2481d4704c3f.zip tk-29fcd9fc6057ab5592252be5af5a2481d4704c3f.tar.gz tk-29fcd9fc6057ab5592252be5af5a2481d4704c3f.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); |