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:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user