diff options
author | nicm <nicm> | 2022-02-22 13:31:18 +0000 |
---|---|---|
committer | nicm <nicm> | 2022-02-22 13:31:18 +0000 |
commit | d54b18ca2bb1383b120e920412e1a7340c4b1416 (patch) | |
tree | 278ca845c6efe8e9e18cdd9bffedff4006b3c4f1 | |
parent | fa71e9a07911715da596d618fe045943337c596b (diff) |
Do not attempt to update focus (and crash) when there is no previous window.
-rw-r--r-- | session.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -503,7 +503,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); |