aboutsummaryrefslogtreecommitdiff
path: root/server-client.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2017-10-12 11:56:06 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2017-10-12 11:56:06 +0100
commitd10def5b0b5a4d000b1a34efd32cc4a2613f66c7 (patch)
tree53c9004f33f2f0a04e2beffff7f49d1cbfa36e29 /server-client.c
parent4efd41f3af9844700f2e959b3aaa1d58caca6146 (diff)
downloadrtmux-d10def5b0b5a4d000b1a34efd32cc4a2613f66c7.tar.gz
rtmux-d10def5b0b5a4d000b1a34efd32cc4a2613f66c7.tar.bz2
rtmux-d10def5b0b5a4d000b1a34efd32cc4a2613f66c7.zip
Check missed during merge.
Diffstat (limited to 'server-client.c')
-rw-r--r--server-client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/server-client.c b/server-client.c
index 7c4af0d6..37b648c8 100644
--- a/server-client.c
+++ b/server-client.c
@@ -1067,7 +1067,7 @@ server_client_resize_force(struct window_pane *wp)
memset(&ws, 0, sizeof ws);
ws.ws_col = wp->sx;
ws.ws_row = wp->sy - 1;
- if (ioctl(wp->fd, TIOCSWINSZ, &ws) == -1)
+ if (wp->fd != -1 && ioctl(wp->fd, TIOCSWINSZ, &ws) == -1)
#ifdef __sun
if (errno != EINVAL && errno != ENXIO)
#endif
@@ -1096,7 +1096,7 @@ server_client_resize_event(__unused int fd, __unused short events, void *data)
memset(&ws, 0, sizeof ws);
ws.ws_col = wp->sx;
ws.ws_row = wp->sy;
- if (ioctl(wp->fd, TIOCSWINSZ, &ws) == -1)
+ if (wp->fd != -1 && ioctl(wp->fd, TIOCSWINSZ, &ws) == -1)
#ifdef __sun
/*
* Some versions of Solaris apparently can return an error when