mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 23:31:02 +00:00
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:
parent
0b88049e99
commit
ae95ed3ec9
1 changed files with 8 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue