mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
feedback: when not in curses mode, just skip displaying any message
Calling die() could trigger another call of emergency_save(), which
could fail and cause another call to statusline(), which would call
die() again... Spiralling until stack space runs out.
This fixes https://savannah.gnu.org/bugs/?60853.
Bug existed since version 5.1, commit 7942dab0
.
Original report was in https://bugzilla.redhat.com/1976410.
Reported-by: Souptik Dutta Roy <duttaroy.souptik@gmail.com>
This commit is contained in:
parent
896f174f94
commit
fc01c5a10e
@ -2255,8 +2255,9 @@ void statusline(message_type importance, const char *msg, ...)
|
||||
|
||||
UNSET(WHITESPACE_DISPLAY);
|
||||
|
||||
/* When not in curses mode, there is no status bar to display anything on. */
|
||||
if (isendwin())
|
||||
die("Out of curses -- please report a bug\n");
|
||||
return;
|
||||
#endif
|
||||
|
||||
/* Ignore a message with an importance that is lower than the last one. */
|
||||
|
Loading…
Reference in New Issue
Block a user