Add some more protection against inconsistent state.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26771 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2008-07-12 21:10:08 +00:00
parent 84d277b3ae
commit 62d0cdf623
3 changed files with 18 additions and 2 deletions

View file

@ -116,6 +116,12 @@ fb04 'ffl'
longestEffectiveRange: &curRange
inRange: maxRange];
fi = [[self fontForCharactersWithAttributes: attributes] fontInfo];
if (!fi)
{
[NSException raise: NSGenericException
format: @"Glyph generation with no font."];
return;
}
glyphForCharacter = (NSGlyph(*)(id, SEL, unichar)) [fi methodForSelector: gfc_sel];
n = [attributes objectForKey: NSLigatureAttributeName];