From ef49b4acb3572f2871ce676de639ac3382156062 Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Tue, 13 Mar 2012 21:46:54 +0200 Subject: fix crashes when only one client on desktop --- monsterwm.c | 1 + 1 file changed, 1 insertion(+) 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)); } -- cgit v1.3.1