diff --git a/platform/lang-impl/src/com/intellij/ide/util/scopeChooser/ScopeEditorPanel.java b/platform/lang-impl/src/com/intellij/ide/util/scopeChooser/ScopeEditorPanel.java index df8137ea1f15..48fb8732323b 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/scopeChooser/ScopeEditorPanel.java +++ b/platform/lang-impl/src/com/intellij/ide/util/scopeChooser/ScopeEditorPanel.java @@ -382,12 +382,14 @@ public class ScopeEditorPanel { public void run() { myIsInUpdate = true; if (updateText) { - final String text = myCurrentScope != null ? myCurrentScope.getText() : ""; - SwingUtilities.invokeLater(new Runnable() { - public void run() { - myPatternField.setText(text); - } - }); + final String text = myCurrentScope != null ? myCurrentScope.getText() : null; + if (text != null) { + SwingUtilities.invokeLater(new Runnable() { + public void run() { + myPatternField.setText(text); + } + }); + } } try { if (!myProject.isDisposed()) {