commit 6bf52dcc8db01c453a7a3875c0806e8390f194ec
parent 3d9e803aed484af36461fa5691df6518a142dcdf
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Mon, 22 Mar 2021 15:44:55 +0100
startup: do not crash when trying to open a device or directory
Make sure there is an 'openfile' record before trying to save an
error message in this record.
This fixes https://savannah.gnu.org/bugs/?60268.
Bug existed since commit ede64d7e from yesterday.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/winio.c b/src/winio.c
@@ -2230,7 +2230,7 @@ void statusline(message_type importance, const char *msg, ...)
va_end(ap);
#ifdef ENABLE_MULTIBUFFER
- if (!we_are_running && importance == ALERT &&
+ if (!we_are_running && importance == ALERT && openfile &&
!openfile->errormessage && openfile->next != openfile)
openfile->errormessage = copy_of(compound);
#endif