fix(3p/nix): fix null pointer dereferences
Change-Id: I4c37febcd4978f17720b2526c267c6bf96e84bcc Reviewed-on: https://cl.tvl.fyi/c/depot/+/1417 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
e191e0afad
commit
388b5f1abe
1 changed files with 2 additions and 2 deletions
|
@ -147,7 +147,7 @@ static int _main(int argc, char* argv[]) {
|
|||
continue;
|
||||
}
|
||||
bool best = false;
|
||||
if (!bestSlotLock) {
|
||||
if (!bestMachine || !bestSlotLock) {
|
||||
best = true;
|
||||
} else if (load / m.speedFactor <
|
||||
bestLoad / bestMachine->speedFactor) {
|
||||
|
@ -170,7 +170,7 @@ static int _main(int argc, char* argv[]) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!bestSlotLock) {
|
||||
if (!bestSlotLock || !bestMachine) {
|
||||
if (rightType && !canBuildLocally) {
|
||||
std::cerr << "# postpone\n";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue