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.
This commit is contained in:
parent
3d9e803aed
commit
6bf52dcc8d
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user