summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2007-11-09 06:22:36 (GMT)
committerdas <das>2007-11-09 06:22:36 (GMT)
commitf18cf4221d375a27e73ebef8c9191bf767eda405 (patch)
treed88e0aa10fc27fe957bf835815374e4f7d90e5e1
parentfef8f89bf21e879ce76c241192871ee50d07fcd1 (diff)
downloadtk-f18cf4221d375a27e73ebef8c9191bf767eda405.zip
tk-f18cf4221d375a27e73ebef8c9191bf767eda405.tar.gz
tk-f18cf4221d375a27e73ebef8c9191bf767eda405.tar.bz2
* macosx/tkMacOSXFont.c (TkpGetFontAttrsForChar): panic on false return
from TkMacOSXSetupDrawingContext().
-rw-r--r--macosx/tkMacOSXFont.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/macosx/tkMacOSXFont.c b/macosx/tkMacOSXFont.c
index e1f609b..8b5e5e9 100644
--- a/macosx/tkMacOSXFont.c
+++ b/macosx/tkMacOSXFont.c
@@ -35,7 +35,7 @@
* that such fonts can not be used for controls, because controls
* definitely require a family id (this assertion needs testing).
*
- * RCS: @(#) $Id: tkMacOSXFont.c,v 1.31 2007/10/30 02:33:10 hobbs Exp $
+ * RCS: @(#) $Id: tkMacOSXFont.c,v 1.32 2007/11/09 06:22:36 das Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -678,7 +678,10 @@ TkpGetFontAttrsForChar(
* But the name of the actual font may still differ, so we activate the
* string as an ATSU layout and ask ATSU about the fallback.
*/
- TkMacOSXSetupDrawingContext(Tk_WindowId(tkwin), NULL, 1, &drawingContext);
+ if (!TkMacOSXSetupDrawingContext(Tk_WindowId(tkwin), NULL, 1,
+ &drawingContext)) {
+ Tcl_Panic("TkpGetFontAttrsForChar: drawingContext not setup");
+ }
LayoutSetString(fontPtr, &drawingContext, &uchar, 1);