Bug 433406: Once spell checker is disabled, it can't be enabled again, patch by Martijn Wargers <martijn.martijn@gmail.com>, r=mats, sr=roc, a=schrep

git-svn-id: svn://10.0.0.236/trunk@251849 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com
2008-05-27 17:55:13 +00:00
parent cd2a76b4ea
commit 5d14e415ec

View File

@@ -1299,11 +1299,13 @@ NS_IMETHODIMP nsEditor::GetInlineSpellChecker(PRBool autoCreate,
return autoCreate ? NS_ERROR_NOT_AVAILABLE : NS_OK;
}
nsresult rv;
if (!mInlineSpellChecker && autoCreate) {
nsresult rv;
mInlineSpellChecker = do_CreateInstance(MOZ_INLINESPELLCHECKER_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
}
if (mInlineSpellChecker) {
rv = mInlineSpellChecker->Init(this);
if (NS_FAILED(rv))
mInlineSpellChecker = nsnull;