summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormdejong <mdejong>2002-07-16 23:29:33 (GMT)
committermdejong <mdejong>2002-07-16 23:29:33 (GMT)
commit7757971b1caae65bfd790c58264dea840caef6cd (patch)
tree7de23bbdc5cea3b7bcfed732b688ae07c9e08ba9
parentc012dc54ecd80bc04abe8c61ff0772c1e481cb89 (diff)
downloadtk-7757971b1caae65bfd790c58264dea840caef6cd.zip
tk-7757971b1caae65bfd790c58264dea840caef6cd.tar.gz
tk-7757971b1caae65bfd790c58264dea840caef6cd.tar.bz2
* generic/tkFont.c (TkFontPkgFree): Call panic instead
of assert since assert is not used in the rest of Tk. [Tk bug 579651]
-rw-r--r--ChangeLog6
-rw-r--r--generic/tkFont.c9
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 <mdejong@users.sourceforge.net>
+ * 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 <mdejong@users.sourceforge.net>
+
* 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 <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
@@ -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");