EA-34179 - NPE: CollectionFactory.arrayList

This commit is contained in:
peter
2012-03-14 09:35:31 +04:00
parent 415eacfea4
commit 50718cea31
@@ -166,7 +166,7 @@ public class RollbackAction extends AnAction implements DumbAware {
@Nullable
private static List<Change> getChanges(final Project project, final AnActionEvent e) {
final ChangesCheckHelper helper = new ChangesCheckHelper(project, e);
if (helper.isChangesSet()) return CollectionFactory.arrayList(helper.getChanges());
if (helper.isChangesSet() && helper.getChanges() != null) return CollectionFactory.arrayList(helper.getChanges());
final VirtualFile[] virtualFiles = e.getData(PlatformDataKeys.VIRTUAL_FILE_ARRAY);
if (virtualFiles != null && virtualFiles.length > 0) {