diff --git a/render.c b/render.c index cf2bdaa4..46bb459c 100644 --- a/render.c +++ b/render.c @@ -1844,7 +1844,7 @@ maybe_resize(struct terminal *term, int width, int height, bool force) term->margins.left, term->margins.right, term->margins.top, term->margins.bottom); /* Signal TIOCSWINSZ */ - if (ioctl(term->ptmx, TIOCSWINSZ, + if (term->ptmx >= 0 && ioctl(term->ptmx, TIOCSWINSZ, &(struct winsize){ .ws_row = term->rows, .ws_col = term->cols,