Fix NullPointerException when accessing file web links in client

If DisplayMethod is for either side NONE then there is no meta
data for this side and the file diff cannot be opened anymore.

Change-Id: I3d1f6bebcc8b83099d51e3a3ac1475fd2443dac1
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2014-10-17 10:04:25 +02:00
parent 75bde8c893
commit 2801c7f175

View File

@@ -108,10 +108,14 @@ class PatchSetSelectBox2 extends Composite {
} else if (sideA) {
baseLink.setStyleName(style.selected());
}
if (meta != null && !Patch.COMMIT_MSG.equals(path)) {
if (meta == null) {
return;
}
if (!Patch.COMMIT_MSG.equals(path)) {
linkPanel.add(createDownloadLink());
}
if (idActive != null && Gerrit.isSignedIn() && meta != null
if (idActive != null && Gerrit.isSignedIn()
&& !Patch.COMMIT_MSG.equals(path)) {
if ((editExists && idActive.get() == 0)
|| (!editExists && idActive.get() == currentPatchSet)) {