[file-history] do not try to show diff when changes array is empty

EA-140308
This commit is contained in:
Julia Beliaeva
2019-03-21 20:15:07 +03:00
parent 40b1f876fb
commit a007e99dd0
@@ -53,7 +53,7 @@ public class CompareRevisionsFromFileHistoryActionProvider implements AnActionEx
Project project = e.getRequiredData(CommonDataKeys.PROJECT);
Change[] changes = e.getData(VcsDataKeys.SELECTED_CHANGES);
if (changes == null || changes.length > 1 || changes[0] == null) return;
if (changes == null || changes.length != 1 || changes[0] == null) return;
ShowDiffAction.showDiffForChange(project, Arrays.asList(changes));
}