diff options
author | nicm <nicm> | 2022-02-22 13:31:18 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-04-06 14:19:50 +0100 |
commit | 046530878b351dc5d99347179f9598d0b40fa268 (patch) | |
tree | 5cea542b90d6d04d2679080975652f6cddbaf323 /session.c | |
parent | a26ebccd421e53ce1e3fcad6f1db9759cb58b043 (diff) | |
download | rtmux-046530878b351dc5d99347179f9598d0b40fa268.tar.gz rtmux-046530878b351dc5d99347179f9598d0b40fa268.tar.bz2 rtmux-046530878b351dc5d99347179f9598d0b40fa268.zip |
Do not attempt to update focus (and crash) when there is no previous window.
Diffstat (limited to 'session.c')
-rw-r--r-- | session.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -501,7 +501,8 @@ session_set_current(struct session *s, struct winlink *wl) winlink_stack_push(&s->lastw, s->curw); s->curw = wl; if (options_get_number(global_options, "focus-events")) { - window_update_focus(old->window); + if (old != NULL) + window_update_focus(old->window); window_update_focus(wl->window); } winlink_clear_flags(wl); |