aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-03-13 21:46:54 +0200
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-03-13 21:46:54 +0200
commitef49b4acb3572f2871ce676de639ac3382156062 (patch)
treef7f1b521dc192ef938d0a9b793ab1d168c5d86d4
parenta055a8e2546d8c2fbc5fb3bf3e7911fb6e0f1612 (diff)
fix crashes when only one client on desktop
-rw-r--r--monsterwm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/monsterwm.c b/monsterwm.c
index 5de1652..6f2c061 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -613,6 +613,7 @@ client* prev_client(client *c) {
/* cyclic focus the previous window
* if the window is the head, focus the last stack window */
void prev_win() {
+ if (!current || !head->next) return;
update_current(prev_client(prevfocus = current));
}