don't add null virtual files to selection

This commit is contained in:
Dmitry Jemerov
2009-11-12 18:19:40 +03:00
parent fba0f9b55c
commit 55e395f523
@@ -426,7 +426,10 @@ public class FileSystemTreeImpl implements FileSystemTree {
final Object object = ((DefaultMutableTreeNode)last).getUserObject();
if (object instanceof FileNodeDescriptor) {
final FileElement element = ((FileNodeDescriptor)object).getElement();
selection.add(element.getFile());
final VirtualFile file = element.getFile();
if (file != null) {
selection.add(file);
}
}
}
}