fix crash entering smiley<space><space> on unix, sr=mscott, 328606

This commit is contained in:
bienvenu%nventure.com 2006-02-28 15:53:07 +00:00
Родитель ca55a8b0cd
Коммит 1a3de1c754
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -927,7 +927,7 @@ mozInlineSpellChecker::AdjustSpellHighlighting(nsIDOMNode *aNode,
rv = GenerateRangeForSurroundingWord(currentNode, aOffset, getter_AddRefs(wordRange)); rv = GenerateRangeForSurroundingWord(currentNode, aOffset, getter_AddRefs(wordRange));
// if we don't have a word range to examine, then bail out early. // if we don't have a word range to examine, then bail out early.
if (!wordRange) if (!wordRange || aOffset < 0)
return NS_OK; return NS_OK;
// if the user just started typing inside of an existing word, remove that word from the spell check // if the user just started typing inside of an existing word, remove that word from the spell check