degesch: fix segfault on /quit under libedit
This commit is contained in:
parent
c015835d3a
commit
8564297e2a
10
degesch.c
10
degesch.c
@ -3989,8 +3989,8 @@ initiate_quit (struct app_context *ctx)
|
||||
{
|
||||
log_global_status (ctx, "Shutting down");
|
||||
|
||||
// Destroy the user interface
|
||||
input_stop (&ctx->input);
|
||||
// Hide the user interface
|
||||
input_hide (&ctx->input);
|
||||
|
||||
// Initiate a connection close
|
||||
struct str_map_iter iter;
|
||||
@ -11569,9 +11569,7 @@ on_tty_readable (const struct pollfd *fd, struct app_context *ctx)
|
||||
process_mirc_escape (fd, ctx);
|
||||
else if (ctx->in_bracketed_paste)
|
||||
process_bracketed_paste (fd, ctx);
|
||||
else if (ctx->input.active)
|
||||
// XXX: this may loop for a bit: stop the event or eat the input?
|
||||
// (This prevents a segfault when the input has been stopped.)
|
||||
else if (!ctx->quitting)
|
||||
input_on_readable (&ctx->input);
|
||||
|
||||
// User activity detected, stop current auto-away and start anew;
|
||||
@ -11866,6 +11864,8 @@ main (int argc, char *argv[])
|
||||
while (ctx.polling)
|
||||
poller_run (&ctx.poller);
|
||||
|
||||
input_stop (&ctx.input);
|
||||
|
||||
if (get_config_boolean (ctx.config.root, "behaviour.save_on_quit"))
|
||||
save_configuration (&ctx);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user