From f18cf4221d375a27e73ebef8c9191bf767eda405 Mon Sep 17 00:00:00 2001 From: das Date: Fri, 9 Nov 2007 06:22:36 +0000 Subject: * macosx/tkMacOSXFont.c (TkpGetFontAttrsForChar): panic on false return from TkMacOSXSetupDrawingContext(). --- macosx/tkMacOSXFont.c | 7 +++++-- 1 file 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); -- cgit v0.12