mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 880237 - Prevent crash in mozInlineSpellChecker::IgnoreWords by asserting mSpellCheck != null. r=ehsan
This commit is contained in:
parent
4f15a54af6
commit
af37cc4060
@ -1015,6 +1015,8 @@ NS_IMETHODIMP
|
||||
mozInlineSpellChecker::IgnoreWords(const PRUnichar **aWordsToIgnore,
|
||||
uint32_t aCount)
|
||||
{
|
||||
NS_ENSURE_TRUE(mSpellCheck, NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
// add each word to the ignore list and then recheck the document
|
||||
for (uint32_t index = 0; index < aCount; index++)
|
||||
mSpellCheck->IgnoreWordAllOccurrences(aWordsToIgnore[index]);
|
||||
@ -1413,6 +1415,8 @@ nsresult mozInlineSpellChecker::DoSpellCheck(mozInlineSpellWordUtil& aWordUtil,
|
||||
{
|
||||
*aDoneChecking = true;
|
||||
|
||||
NS_ENSURE_TRUE(mSpellCheck, NS_ERROR_NOT_INITIALIZED);
|
||||
|
||||
// get the editor for SkipSpellCheckForNode, this may fail in reasonable
|
||||
// circumstances since the editor could have gone away
|
||||
nsCOMPtr<nsIEditor> editor (do_QueryReferent(mEditor));
|
||||
|
Loading…
Reference in New Issue
Block a user