diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-12-04 20:25:17 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-12-04 20:25:17 +0000 |
commit | 6f142e9ac61783e79c27e56ed6aa2fc7ff13683d (patch) | |
tree | 1ffd37064732d7a73b22348706625f8888c44122 /server.c | |
parent | 5f6a9e7e5bdbb6b965ba669d722ee9308ea27e16 (diff) | |
download | rtmux-6f142e9ac61783e79c27e56ed6aa2fc7ff13683d.tar.gz rtmux-6f142e9ac61783e79c27e56ed6aa2fc7ff13683d.tar.bz2 rtmux-6f142e9ac61783e79c27e56ed6aa2fc7ff13683d.zip |
Don't try to access more windows if the session has been destroyed.
Diffstat (limited to 'server.c')
-rw-r--r-- | server.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: server.c,v 1.42 2007-12-01 11:10:33 nicm Exp $ */ +/* $Id: server.c,v 1.43 2007-12-04 20:25:17 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -436,8 +436,8 @@ server_lost_window(struct window *w) if (!session_has(s, w)) continue; - /* Detach window and either redraw or kill clients. */ restart: + /* Detach window and either redraw or kill clients. */ RB_FOREACH(wl, winlinks, &s->windows) { if (wl->window != w) continue; @@ -453,6 +453,9 @@ server_lost_window(struct window *w) c->session = NULL; server_write_client(c, MSG_EXIT, NULL, 0); } + /* If the session was destroyed, bail now. */ + if (destroyed) + break; goto restart; } } |