diff --git a/plugins/spellchecker/src/com/intellij/spellchecker/engine/BaseSpellChecker.java b/plugins/spellchecker/src/com/intellij/spellchecker/engine/BaseSpellChecker.java index 70119cf69428..7f3e6e116b29 100644 --- a/plugins/spellchecker/src/com/intellij/spellchecker/engine/BaseSpellChecker.java +++ b/plugins/spellchecker/src/com/intellij/spellchecker/engine/BaseSpellChecker.java @@ -149,7 +149,8 @@ public class BaseSpellChecker implements SpellCheckerEngine { UIUtil.invokeLaterIfNeeded(new Runnable() { @Override public void run() { - DaemonCodeAnalyzer.getInstance(project).restart(); + final DaemonCodeAnalyzer instance = DaemonCodeAnalyzer.getInstance(project); + if (instance != null) instance.restart(); } }); }