mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:04:20 +00:00
* Source/NSTextView.m: Protect usages of sharedSpellChecker with
nil tests. Patch by Eric Wasylishen <ewasylishen@gmail.com> git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@38283 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
db33ab6d5a
commit
6b0a46b215
2 changed files with 12 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2015-01-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSTextView.m: Protect usages of sharedSpellChecker with
|
||||
nil tests.
|
||||
Patch by Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
2015-01-05 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Source/GSToolbarView.m (menuForEvent)
|
||||
|
|
|
@ -5873,7 +5873,7 @@ static const NSInteger GSSpellingSuggestionMenuItemTag = 1;
|
|||
|
||||
NSSpellChecker *sp = [NSSpellChecker sharedSpellChecker];
|
||||
NSString *word = [[self string] substringWithRange: [self selectedRange]];
|
||||
if ([sp checkSpellingOfString: word startingAt: 0].location != NSNotFound)
|
||||
if (sp != nil && [sp checkSpellingOfString: word startingAt: 0].location != NSNotFound)
|
||||
{
|
||||
/*NSArray *guesses = [sp guessesForWordRange: wordRange
|
||||
inString: [self string]
|
||||
|
@ -6272,6 +6272,11 @@ or add guards
|
|||
// nearest word boundary
|
||||
NSString *substring = [[self string] substringWithRange: aRange];
|
||||
|
||||
if (sp == nil)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
do {
|
||||
NSRange errorRange = [sp checkSpellingOfString: substring
|
||||
startingAt: start
|
||||
|
|
Loading…
Reference in a new issue