From 5d14e415ec1154425e39bc4d3cc29d4c4e8d0c58 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Tue, 27 May 2008 17:55:13 +0000 Subject: [PATCH] Bug 433406: Once spell checker is disabled, it can't be enabled again, patch by Martijn Wargers , r=mats, sr=roc, a=schrep git-svn-id: svn://10.0.0.236/trunk@251849 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/libeditor/base/nsEditor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;