diff --git a/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/DestinationFolderComboBox.java b/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/DestinationFolderComboBox.java index 1308fa22ae73..d94d8436bf92 100644 --- a/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/DestinationFolderComboBox.java +++ b/java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/DestinationFolderComboBox.java @@ -224,7 +224,7 @@ public abstract class DestinationFolderComboBox extends ComboboxWithBrowseButton oldOne = itemWrapper; } } - if (!fileIndex.isInLibrarySource(oldSelection)) { + if (oldSelection == null || !fileIndex.isInLibrarySource(oldSelection)) { items.add(NULL_WRAPPER); } final DirectoryChooser.ItemWrapper selection = chooseSelection(initialTargetDirectorySourceRoot, fileIndex, items, initial, oldOne);