From 334e41daa45150e6aa66c768c1262f4f186918e8 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 27 Jan 2011 16:51:16 +0100 Subject: [PATCH] =?UTF-8?q?bugfix:=20don=E2=80=99t=20assume=20a=20workspac?= =?UTF-8?q?e=20always=20has=20tiling=20cons=20when=20focusing=20(Thanks=20?= =?UTF-8?q?mseed)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tree.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tree.c b/src/tree.c index 9af64def..aaf57cfb 100644 --- a/src/tree.c +++ b/src/tree.c @@ -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') {