diff --git a/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreview.java b/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreview.java index db85cea826ab..e2eccb85cbf8 100644 --- a/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreview.java +++ b/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreview.java @@ -250,7 +250,7 @@ public class LivePreview extends DocumentAdapter implements ReplacementView.Dele } myVisibleAreaListenersToRemove.clear(); Project project = mySearchResults.getProject(); - if (!project.isDisposed()) { + if (project != null && !project.isDisposed()) { for (RangeHighlighter h : myHighlighters) { HighlightManager.getInstance(project).removeSegmentHighlighter(editor, h); }