Merge "Avoid NPE in get related changes" into stable-2.11
This commit is contained in:
commit
4318e68ef6
@ -116,7 +116,10 @@ public class GetRelated implements RestReadView<RevisionResource> {
|
|||||||
PatchSet p = commits.get(c.name());
|
PatchSet p = commits.get(c.name());
|
||||||
Change g = null;
|
Change g = null;
|
||||||
if (p != null) {
|
if (p != null) {
|
||||||
g = changes.get(p.getId().getParentKey()).change();
|
ChangeData cd = changes.get(p.getId().getParentKey());
|
||||||
|
if (cd != null) {
|
||||||
|
g = cd.change();
|
||||||
|
}
|
||||||
added.add(p.getId().getParentKey());
|
added.add(p.getId().getParentKey());
|
||||||
}
|
}
|
||||||
parents.add(new ChangeAndCommit(g, p, c));
|
parents.add(new ChangeAndCommit(g, p, c));
|
||||||
|
Loading…
Reference in New Issue
Block a user