mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 08:30:58 +00:00
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:
parent
84d277b3ae
commit
62d0cdf623
3 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2008-07-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Source/GSLayoutManager.m (-_glyphForCharacter:index:positions::),
|
||||||
|
* Source/NSGlyphGenerator.m (-generateGlyphsForGlyphStorage:...):
|
||||||
|
Add some more protection against inconsistent state.
|
||||||
|
|
||||||
2008-07-12 Fred Kiefer <FredKiefer@gmx.de>
|
2008-07-12 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSSavePanel.m (-ok:): Standardize path before checking
|
* Source/NSSavePanel.m (-ok:): Standardize path before checking
|
||||||
|
|
|
@ -768,8 +768,12 @@ Fills in all glyph holes up to last. only looking at levels below level
|
||||||
int lo, hi, mid, i;
|
int lo, hi, mid, i;
|
||||||
|
|
||||||
r = run_for_character_index(target, glyphs, &pos, &cpos);
|
r = run_for_character_index(target, glyphs, &pos, &cpos);
|
||||||
if (!r)
|
if (!r || !r->glyphs)
|
||||||
return NULL;
|
{
|
||||||
|
[NSException raise: NSRangeException
|
||||||
|
format: @"%s character index out of range", __PRETTY_FUNCTION__];
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
target -= cpos;
|
target -= cpos;
|
||||||
|
|
||||||
|
|
|
@ -116,6 +116,12 @@ fb04 'ffl'
|
||||||
longestEffectiveRange: &curRange
|
longestEffectiveRange: &curRange
|
||||||
inRange: maxRange];
|
inRange: maxRange];
|
||||||
fi = [[self fontForCharactersWithAttributes: attributes] fontInfo];
|
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];
|
glyphForCharacter = (NSGlyph(*)(id, SEL, unichar)) [fi methodForSelector: gfc_sel];
|
||||||
|
|
||||||
n = [attributes objectForKey: NSLigatureAttributeName];
|
n = [attributes objectForKey: NSLigatureAttributeName];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue