diff options
author | Thomas Adam <thomas@xteddy.org> | 2016-10-15 02:01:12 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2016-10-15 02:01:12 +0100 |
commit | 623e54788e77068779933eb60a042e5a82f32673 (patch) | |
tree | 02ce8da6ff4062b9d4c4b9846960f6f9849e0b2b /session.c | |
parent | 3d2686a236b4ffee762ada8ebb493d8db91f7375 (diff) | |
parent | 3f138dc40c37ddee021b92e5d29676ed96b6cab8 (diff) | |
download | rtmux-623e54788e77068779933eb60a042e5a82f32673.tar.gz rtmux-623e54788e77068779933eb60a042e5a82f32673.tar.bz2 rtmux-623e54788e77068779933eb60a042e5a82f32673.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -210,6 +210,7 @@ session_destroy(struct session *s) struct winlink *wl; log_debug("session %s destroyed", s->name); + s->curw = NULL; RB_REMOVE(sessions, &sessions, s); notify_session_closed(s); @@ -384,14 +385,17 @@ int session_detach(struct session *s, struct winlink *wl) { if (s->curw == wl && - session_last(s) != 0 && session_previous(s, 0) != 0) + session_last(s) != 0 && + session_previous(s, 0) != 0) session_next(s, 0); wl->flags &= ~WINLINK_ALERTFLAGS; notify_window_unlinked(s, wl->window); winlink_stack_remove(&s->lastw, wl); winlink_remove(&s->windows, wl); + session_group_synchronize_from(s); + if (RB_EMPTY(&s->windows)) { session_destroy(s); return (1); |