control.c, bug 374, prevent crash if cend[stackp] is NULL

reported by  PyroPeter
This commit is contained in:
Holger Vogt 2018-11-05 21:03:21 +01:00
parent 9289f0f773
commit ebe4fd5332
1 changed files with 1 additions and 1 deletions

View File

@ -639,7 +639,7 @@ cp_evloop(char *string)
for (;;) {
freewl = wlist = getcommand(string);
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();
continue;
} else {