From: Michael Stapelberg Date: Thu, 27 Jan 2011 15:51:16 +0000 (+0100) Subject: bugfix: don’t assume a workspace always has tiling cons when focusing (Thanks mseed) X-Git-Tag: tree-pr2~94 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=334e41daa45150e6aa66c768c1262f4f186918e8;p=i3%2Fi3 bugfix: don’t assume a workspace always has tiling cons when focusing (Thanks mseed) --- 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') {