diff options
author | uint23 <[email protected]> | 2025-04-29 18:54:48 +0100 |
---|---|---|
committer | uint23 <[email protected]> | 2025-04-29 18:54:48 +0100 |
commit | b9ce5c68834a2af1645333b274b90126f6f24128 (patch) | |
tree | 621f016d0b628e6dc7711ae6a607dc1aecd8141a | |
parent | 61c1e16a841cc7b7bc72b727052eadf346a63c4e (diff) |
added guards to focus_next & pev to make sure no segfault on trying to swithc focus on them
-rw-r--r-- | src/sxwm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -226,7 +226,7 @@ void dec_gaps(void) void focus_next(void) { - if (!focused) { + if (!focused || !workspaces[current_ws]) { return; } @@ -238,7 +238,7 @@ void focus_next(void) void focus_prev(void) { - if (!focused) { + if (!focused || !workspaces[current_ws]) { return; } @@ -1491,4 +1491,4 @@ int main(int ac, char **av) setup(); run(); return 0; -} +}
\ No newline at end of file |