Prevent a crash when -selectedRange is called for an NSTextView

without a layout manager.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29165 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Wolfgang Lux 2009-12-23 01:01:57 +00:00
parent 395f9a293b
commit 425e51363c
2 changed files with 5 additions and 0 deletions

View file

@ -4,6 +4,9 @@
-shouldChangeTextInRange:replacementString:): Implement coalescing
of undo actions for typing events.
* Source/NSTextView.m (-selectedRange): Prevent crash when the
receiver has no layout manager.
2009-12-23 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSTableView.m (-mouseDown:): A single click into a cell

View file

@ -2900,6 +2900,8 @@ Scroll so that the beginning of the range is visible.
- (NSRange) selectedRange
{
if (!_layoutManager)
return NSMakeRange(0, 0);
return _layoutManager->_selected_range;
}