Bugfix: fix crash in tree_flatten (Thanks mseed)
This commit is contained in:
parent
0eb5eb34cd
commit
3fe4146e24
|
@ -525,7 +525,7 @@ void tree_flatten(Con *con) {
|
|||
|
||||
/* Ensure it got only one child */
|
||||
child = TAILQ_FIRST(&(con->nodes_head));
|
||||
if (TAILQ_NEXT(child, nodes) != NULL)
|
||||
if (child == NULL || TAILQ_NEXT(child, nodes) != NULL)
|
||||
goto recurse;
|
||||
|
||||
/* The child must have a different orientation than the con but the same as
|
||||
|
|
Loading…
Reference in New Issue