Fix a stupid segfault caused by dereferencing a NULL ptr.
-Erik
This commit is contained in:
parent
45e92ba2ce
commit
0a36de0580
2
hush.c
2
hush.c
@ -1162,6 +1162,8 @@ static void checkjobs()
|
|||||||
remove_bg_job(pi);
|
remove_bg_job(pi);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if(pi==NULL)
|
||||||
|
break;
|
||||||
/* child stopped */
|
/* child stopped */
|
||||||
pi->stopped_progs++;
|
pi->stopped_progs++;
|
||||||
pi->progs[prognum].is_stopped = 1;
|
pi->progs[prognum].is_stopped = 1;
|
||||||
|
@ -1162,6 +1162,8 @@ static void checkjobs()
|
|||||||
remove_bg_job(pi);
|
remove_bg_job(pi);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
if(pi==NULL)
|
||||||
|
break;
|
||||||
/* child stopped */
|
/* child stopped */
|
||||||
pi->stopped_progs++;
|
pi->stopped_progs++;
|
||||||
pi->progs[prognum].is_stopped = 1;
|
pi->progs[prognum].is_stopped = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user