1
1
mirror of https://github.com/swaywm/sway synced 2024-11-18 19:03:59 +01:00

sway/container.c: fix segfault where view is assigned prematurely

This commit is contained in:
Daniel Lockyer 2016-05-09 17:41:26 +01:00
parent 8ee764e0c2
commit 2fb4e5401c

@ -820,10 +820,10 @@ swayc_t *swayc_tabbed_stacked_parent(swayc_t *view) {
return NULL;
}
do {
view = view->parent;
if (view->layout == L_TABBED || view->layout == L_STACKED) {
parent = view;
}
view = view->parent;
} while (view && view->type != C_WORKSPACE);
return parent;