summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2022-02-22 16:01:11 +0000
committerThomas Adam <thomas@xteddy.org>2022-02-22 16:01:11 +0000
commitdc0746946eb4f64b8512da6d981e7d71aa56e9f4 (patch)
treed90fc876039d8848dedde24643f68df792e79414
parent2be54886932e6214dfd67ba0b6d8c21fdaff4409 (diff)
parentd54b18ca2bb1383b120e920412e1a7340c4b1416 (diff)
Merge branch 'obsd-master' into master
-rw-r--r--session.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/session.c b/session.c
index d9d9c486..75028882 100644
--- a/session.c
+++ b/session.c
@@ -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);