From bc66e4de24d343c868280a9e82811f6818189d9d Mon Sep 17 00:00:00 2001 From: Nadya Zabrodina Date: Thu, 18 Jun 2015 11:46:47 +0400 Subject: [PATCH] NPE fixed for applyPatch and unshelve --- .../vcs/changes/patch/ApplyPatchDifferentiatedDialog.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java index 4172471be0de..2b65a17cf598 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDifferentiatedDialog.java @@ -339,7 +339,9 @@ public class ApplyPatchDifferentiatedDialog extends DialogWrapper { if (patchReader == null) return; List filePatches = ContainerUtil.newArrayList(patchReader.getPatches()); - filePatches.addAll(myBinaryShelvedPatches); + if (!ContainerUtil.isEmpty(myBinaryShelvedPatches)) { + filePatches.addAll(myBinaryShelvedPatches); + } final List matchedPatches = new MatchPatchPaths(myProject).execute(filePatches); ApplicationManager.getApplication().invokeLater(new Runnable() {