Fixed method returning a text container for when there is no text

container set ... typically happening during text system setup


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@12480 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Nicola Pero 2002-02-11 02:00:35 +00:00
parent 0b88049e99
commit ae95ed3ec9

View file

@ -431,7 +431,14 @@ static NSCharacterSet *invSelectionWordGranularitySet;
if (effectiveRange)
*effectiveRange = NSMakeRange(0, [_textStorage length]);
return [_textContainers objectAtIndex: 0];
if ([_textContainers count] == 0)
{
return nil;
}
else
{
return [_textContainers objectAtIndex: 0];
}
}
- (void) setTextContainer: (NSTextContainer*)aTextContainer