Bugfix: fix crash in tree_flatten (Thanks mseed)

This commit is contained in:
Michael Stapelberg 2011-01-19 09:31:31 +01:00
parent 0eb5eb34cd
commit 3fe4146e24
1 changed files with 1 additions and 1 deletions

View File

@ -525,7 +525,7 @@ void tree_flatten(Con *con) {
/* Ensure it got only one child */ /* Ensure it got only one child */
child = TAILQ_FIRST(&(con->nodes_head)); child = TAILQ_FIRST(&(con->nodes_head));
if (TAILQ_NEXT(child, nodes) != NULL) if (child == NULL || TAILQ_NEXT(child, nodes) != NULL)
goto recurse; goto recurse;
/* The child must have a different orientation than the con but the same as /* The child must have a different orientation than the con but the same as