]> git.sur5r.net Git - i3/i3/commitdiff
Bugfix: Fix 'focus mode_toggle' on an empty workspace (Thanks BeF)
authorMichael Stapelberg <michael@stapelberg.de>
Tue, 23 Aug 2011 22:55:11 +0000 (00:55 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Tue, 23 Aug 2011 22:55:11 +0000 (00:55 +0200)
Fixes #487

src/cmdparse.y

index 9b63ff0cdcd147ba1b8c946a8c3002ba301ae81e..d271c997b756a47ce19277618c285dc90254ca1b 100644 (file)
@@ -484,7 +484,7 @@ focus:
             int to_focus = $2;
             if ($2 == TOK_MODE_TOGGLE) {
                 current = TAILQ_FIRST(&(ws->focus_head));
-                if (current->type == CT_FLOATING_CON)
+                if (current != NULL && current->type == CT_FLOATING_CON)
                     to_focus = TOK_TILING;
                 else to_focus = TOK_FLOATING;
             }