From ebe4fd5332fcde021f456eec9191c7206e7b7c8d Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 5 Nov 2018 21:03:21 +0100 Subject: [PATCH] control.c, bug 374, prevent crash if cend[stackp] is NULL reported by PyroPeter --- src/frontend/control.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/control.c b/src/frontend/control.c index c82a5ab3b..6e591b52f 100644 --- a/src/frontend/control.c +++ b/src/frontend/control.c @@ -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 {