degesch: prevent segfault on exit with libedit
This commit is contained in:
parent
90ddcc3454
commit
bdbc4b33f0
|
@ -5727,6 +5727,9 @@ on_tty_readable (const struct pollfd *fd, struct app_context *ctx)
|
||||||
if (fd->revents & ~(POLLIN | POLLHUP | POLLERR))
|
if (fd->revents & ~(POLLIN | POLLHUP | POLLERR))
|
||||||
print_debug ("fd %d: unexpected revents: %d", fd->fd, fd->revents);
|
print_debug ("fd %d: unexpected revents: %d", fd->fd, fd->revents);
|
||||||
|
|
||||||
|
// XXX: this may loop for a bit: stop the event or eat the input?
|
||||||
|
// (This prevents a segfault when the input has been stopped.)
|
||||||
|
if (ctx->input.active)
|
||||||
input_on_readable (&ctx->input);
|
input_on_readable (&ctx->input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue