killbig(): fix crash if no process could be found

This commit is contained in:
cinap_lenrek 2011-12-13 16:10:37 +01:00
parent 36dc22fd57
commit 1238374df9

View file

@ -1514,7 +1514,8 @@ killbig(char *why)
max = l; max = l;
} }
} }
if(kp == 0)
return;
print("%lud: %s killed: %s\n", kp->pid, kp->text, why); print("%lud: %s killed: %s\n", kp->pid, kp->text, why);
for(p = procalloc.arena; p < ep; p++) { for(p = procalloc.arena; p < ep; p++) {
if(p->state == Dead || p->kp) if(p->state == Dead || p->kp)