diff options
author | John Ankarström <john@ankarstrom.se> | 2021-06-09 13:13:30 +0200 |
---|---|---|
committer | John Ankarström <john@ankarstrom.se> | 2021-06-09 13:13:57 +0200 |
commit | e56ca0d6aaeb97e200a26d74a62a2858162f14fe (patch) | |
tree | 5f8fe935b776b90538078ed5ff52eb39e3f6b31f /src | |
parent | e5183161aa2ff9d46ba2be32d471913d3ae56a0e (diff) | |
download | jwm-e56ca0d6aaeb97e200a26d74a62a2858162f14fe.tar.gz |
Fix crash on next/prev if no window is active
Diffstat (limited to 'src')
-rw-r--r-- | src/event.c | 6 |
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(); |