summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tkFont.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index cfb6d80..27303a0 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -10,7 +10,7 @@
* 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.56 2009/07/21 15:16:47 dkf Exp $
+ * RCS: @(#) $Id: tkFont.c,v 1.57 2009/09/09 22:23:58 dkf Exp $
*/
#include "tkInt.h"
@@ -1188,6 +1188,14 @@ Tk_AllocFontFromObj(
*/
fontPtr = TkpGetFontFromAttributes(NULL, tkwin, &fa);
+ if (fontPtr == NULL) {
+ Tcl_AppendResult(interp, "failed to allocate font due to ",
+ "internal font engine problem", NULL);
+ if (isNew) {
+ Tcl_DeleteHashEntry(cacheHashPtr);
+ }
+ return NULL;
+ }
}
}