diff options
Diffstat (limited to 'usr.bin/tmux/server-fn.c')
-rw-r--r-- | usr.bin/tmux/server-fn.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c index 74f82af9b56..158d4e9534e 100644 --- a/usr.bin/tmux/server-fn.c +++ b/usr.bin/tmux/server-fn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-fn.c,v 1.35 2010/03/22 19:18:46 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.36 2010/04/17 23:25:16 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -325,9 +325,11 @@ server_destroy_pane(struct window_pane *wp) { struct window *w = wp->window; - close(wp->fd); - bufferevent_free(wp->event); - wp->fd = -1; + if (wp->fd != -1) { + close(wp->fd); + bufferevent_free(wp->event); + wp->fd = -1; + } if (options_get_number(&w->options, "remain-on-exit")) return; |