aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-06-09 13:13:30 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-06-09 13:13:57 +0200
commite56ca0d6aaeb97e200a26d74a62a2858162f14fe (patch)
tree5f8fe935b776b90538078ed5ff52eb39e3f6b31f /src
parente5183161aa2ff9d46ba2be32d471913d3ae56a0e (diff)
downloadjwm-e56ca0d6aaeb97e200a26d74a62a2858162f14fe.tar.gz
Fix crash on next/prev if no window is active
Diffstat (limited to 'src')
-rw-r--r--src/event.c6
1 files changed, 4 insertions, 2 deletions
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();