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:
@@ -2230,7 +2230,7 @@ void statusline(message_type importance, const char *msg, ...)
|
|||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifdef ENABLE_MULTIBUFFER
|
||||||
if (!we_are_running && importance == ALERT &&
|
if (!we_are_running && importance == ALERT && openfile &&
|
||||||
!openfile->errormessage && openfile->next != openfile)
|
!openfile->errormessage && openfile->next != openfile)
|
||||||
openfile->errormessage = copy_of(compound);
|
openfile->errormessage = copy_of(compound);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user