summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2012-09-11 18:14:47 (EDT)
committerSteffen Pingel2012-09-11 18:14:47 (EDT)
commit5abdeca511870ac21eafb4b3c3659d8fb95c1245 (patch)
treed1d558f4a651b545e8807a39eae2032f9a076edf
parent270aaed7524a646429262557101a5d60ec6b7fa6 (diff)
downloadorg.eclipse.mylyn.reviews-5abdeca511870ac21eafb4b3c3659d8fb95c1245.zip
org.eclipse.mylyn.reviews-5abdeca511870ac21eafb4b3c3659d8fb95c1245.tar.gz
org.eclipse.mylyn.reviews-5abdeca511870ac21eafb4b3c3659d8fb95c1245.tar.bz2
389347: NPE in PatchSetSection openrefs/changes/43/7443/2
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);
+ }
}
});