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
parent ca55a8b0cd
commit 1a3de1c754

View File

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