NPE fixed for applyPatch and unshelve

This commit is contained in:
Nadya Zabrodina
2015-06-18 11:48:44 +04:00
parent 8725bc7603
commit bc66e4de24
@@ -339,7 +339,9 @@ public class ApplyPatchDifferentiatedDialog extends DialogWrapper {
if (patchReader == null) return;
List<FilePatch> filePatches = ContainerUtil.<FilePatch>newArrayList(patchReader.getPatches());
filePatches.addAll(myBinaryShelvedPatches);
if (!ContainerUtil.isEmpty(myBinaryShelvedPatches)) {
filePatches.addAll(myBinaryShelvedPatches);
}
final List<AbstractFilePatchInProgress> matchedPatches = new MatchPatchPaths(myProject).execute(filePatches);
ApplicationManager.getApplication().invokeLater(new Runnable() {