--- plugins/textediting/spellcheck/SpellCheck.cpp.org 2012-03-29 07:19:58.808192633 +0200 +++ plugins/textediting/spellcheck/SpellCheck.cpp 2012-03-29 07:28:13.671184157 +0200 @@ -44,7 +44,8 @@ m_allowSignals(true), m_documentIsLoading(false), m_isChecking(false), - m_spellCheckMenu(0) + m_spellCheckMenu(0), + m_document(0) { /* setup actions for this plugin */ KAction *configureAction = new KAction(i18n("Configure &Spell Checking..."), this); @@ -141,7 +142,7 @@ { m_speller.setDefaultLanguage(language); m_bgSpellCheck->setDefaultLanguage(language); - if (m_enableSpellCheck) { + if (m_enableSpellCheck && m_document) { checkSection(m_document, 0, m_document->characterCount() - 1); } }