ChangeScreen: Expect that current revision can be null

Change-Id: I9f15935bb11e07ac27d367e2bdb2d4e055c8263b
Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
Edwin Kempin
2016-11-18 12:53:59 -08:00
parent 4aae28b27d
commit 838c29de74
2 changed files with 4 additions and 2 deletions

View File

@@ -462,7 +462,8 @@ public class ChangeScreen extends Screen {
}
private void gotoSibling(int offset) {
if (offset > 0 && changeInfo.currentRevision().equals(revision)) {
if (offset > 0 && changeInfo.currentRevision() != null
&& changeInfo.currentRevision().equals(revision)) {
return;
}

View File

@@ -215,7 +215,8 @@ public class RelatedChanges extends TabPanel {
EnumSet.of(ListChangesOption.CURRENT_REVISION, ListChangesOption.CURRENT_COMMIT),
new TabChangeListCallback(Tab.CHERRY_PICKS, info.project(), revision));
if (info.currentRevision().equals(revision)) {
if (info.currentRevision() != null
&& info.currentRevision().equals(revision)) {
ChangeApi.change(info.legacyId().get()).view("submitted_together")
.get(new TabChangeListCallback(Tab.SUBMITTED_TOGETHER,
info.project(), revision));