From e56ca0d6aaeb97e200a26d74a62a2858162f14fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Wed, 9 Jun 2021 13:13:30 +0200 Subject: Fix crash on next/prev if no window is active --- src/event.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/event.c b/src/event.c index e8a0049..0b12b82 100644 --- a/src/event.c +++ b/src/event.c @@ -362,14 +362,16 @@ void HandleKeyPress(const XKeyEvent *event) { break; case KEY_NEXT: FocusNext(); - RaiseClient(GetActiveClient()); + np = GetActiveClient(); + if (np != NULL) RaiseClient(np); break; case KEY_NEXT_STACKED: FocusNextStackedCircular(); break; case KEY_PREV: FocusPrevious(); - RaiseClient(GetActiveClient()); + np = GetActiveClient(); + if (np != NULL) RaiseClient(np); break; case KEY_PREV_STACKED: FocusPreviousStackedCircular(); -- cgit v1.2.3