diff --git a/mozilla/editor/libeditor/base/nsEditor.cpp b/mozilla/editor/libeditor/base/nsEditor.cpp index 3c6a9844de4..b10371701d3 100644 --- a/mozilla/editor/libeditor/base/nsEditor.cpp +++ b/mozilla/editor/libeditor/base/nsEditor.cpp @@ -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;