Protect against another replace.cmd NPE
I missed a spot where the ReplaceRequest cmd field can be null. If its null, the command obviously failed to be prepared and must be skipped, causing the overall push to reject. Change-Id: Ib3011ea9393287a46aa01fd486d83fedb043d83f
This commit is contained in:
@@ -613,10 +613,10 @@ public class ReceiveCommits {
|
||||
if (replace.inputCommand == newChange) {
|
||||
replaceCount++;
|
||||
|
||||
if (replace.cmd.getResult() == OK) {
|
||||
if (replace.cmd != null && replace.cmd.getResult() == OK) {
|
||||
okToInsert++;
|
||||
}
|
||||
} else if (replace.cmd.getResult() == OK) {
|
||||
} else if (replace.cmd != null && replace.cmd.getResult() == OK) {
|
||||
try {
|
||||
if (replace.insertPatchSet().checkedGet() != null) {
|
||||
replace.inputCommand.setResult(OK);
|
||||
|
||||
Reference in New Issue
Block a user