]> git.sur5r.net Git - i3/i3/commitdiff
bugfix: don’t assume a workspace always has tiling cons when focusing (Thanks mseed)
authorMichael Stapelberg <michael@stapelberg.de>
Thu, 27 Jan 2011 15:51:16 +0000 (16:51 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Thu, 27 Jan 2011 15:51:16 +0000 (16:51 +0100)
src/tree.c

index 9af64def15336ed13ae20251333dd5a419fd09b6..aaf57cfb9724bddc1bf880b4a59e7e0b0d08b175 100644 (file)
@@ -341,6 +341,11 @@ void tree_next(char way, orientation_t orientation) {
     Con *current = TAILQ_FIRST(&(parent->focus_head));
     assert(current != TAILQ_END(&(parent->focus_head)));
 
+    if (TAILQ_EMPTY(&(parent->nodes_head))) {
+        DLOG("Nothing to focus here, move along...\n");
+        return;
+    }
+
     /* 2: chose next (or previous) */
     Con *next;
     if (way == 'n') {