control.c, bug 374, prevent crash if cend[stackp] is NULL
reported by PyroPeter
This commit is contained in:
parent
9289f0f773
commit
ebe4fd5332
|
|
@ -639,7 +639,7 @@ cp_evloop(char *string)
|
||||||
for (;;) {
|
for (;;) {
|
||||||
freewl = wlist = getcommand(string);
|
freewl = wlist = getcommand(string);
|
||||||
if (wlist == NULL) { /* End of file or end of user input. */
|
if (wlist == NULL) { /* End of file or end of user input. */
|
||||||
if (cend[stackp]->co_parent && !string) {
|
if (cend[stackp] && cend[stackp]->co_parent && !string) {
|
||||||
cp_resetcontrol();
|
cp_resetcontrol();
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue