summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2012-09-11 18:14:47 (EDT)
committerSteffen Pingel2012-09-11 18:26:34 (EDT)
commitfb6e1fcb99f45645e0d711394495564daec4bbaa (patch)
tree418e58f95c21bbf5c3ccbc044854df8402a31a07
parentbc4691e3a90c096b4c90752cf87af8e71886c9a4 (diff)
downloadorg.eclipse.mylyn.reviews-fb6e1fcb99f45645e0d711394495564daec4bbaa.zip
org.eclipse.mylyn.reviews-fb6e1fcb99f45645e0d711394495564daec4bbaa.tar.gz
org.eclipse.mylyn.reviews-fb6e1fcb99f45645e0d711394495564daec4bbaa.tar.bz2
389347: NPE in PatchSetSection open
Triggered by clicking to select nothing and pushing the Enter key. Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=389347 Change-Id: I3a8cfe13e49f11c88ee66512dba868e945e4c0db
-rw-r--r--org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/PatchSetSection.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/PatchSetSection.java b/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/PatchSetSection.java
index baa2d60..3ca3d32 100644
--- a/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/PatchSetSection.java
+++ b/org.eclipse.mylyn.gerrit.ui/src/org/eclipse/mylyn/internal/gerrit/ui/editor/PatchSetSection.java
@@ -582,7 +582,9 @@ public class PatchSetSection extends AbstractGerritSection {
public void open(OpenEvent event) {
IStructuredSelection selection = (IStructuredSelection) event.getSelection();
IFileItem item = (IFileItem) selection.getFirstElement();
- doOpen((IReviewItemSet) viewer.getInput(), item);
+ if (item != null) {
+ doOpen((IReviewItemSet) viewer.getInput(), item);
+ }
}
});