summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2002-06-22 09:13:36 (GMT)
committerhobbs <hobbs@noemail.net>2002-06-22 09:13:36 (GMT)
commit854769dc6339653cd2461bf51adaae938df9f74e (patch)
tree568826424534244025ec2380eadc5e498c280cd9
parentdac7b13e3edc2fa0dbfb77a396245858983b6a6b (diff)
downloadtk-854769dc6339653cd2461bf51adaae938df9f74e.zip
tk-854769dc6339653cd2461bf51adaae938df9f74e.tar.gz
tk-854769dc6339653cd2461bf51adaae938df9f74e.tar.bz2
* generic/tkFont.c (TkFontPkgFree): changed panic on freeing fonts
to an assert, and wrapped panic in #ifdef PURIFY. [Bug #568701] FossilOrigin-Name: 5333cc42cc7be979e8fb028be31ce222b0abd8b7
-rw-r--r--generic/tkFont.c9
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);