mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-11-17 07:48:28 +01:00
Added a null check in tabbed_stacked_parent
This fixes a segfault, when trying to get parent of the workspace/root container/(?), as it is not assuered that the view's parent node is not null in the loop
This commit is contained in:
parent
3ce8cc8077
commit
7870a197fc
1 changed files with 2 additions and 2 deletions
|
@ -853,12 +853,12 @@ swayc_t *swayc_tabbed_stacked_parent(swayc_t *view) {
|
||||||
if (!ASSERT_NONNULL(view)) {
|
if (!ASSERT_NONNULL(view)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
do {
|
while (view->type != C_WORKSPACE && view->parent) {
|
||||||
view = view->parent;
|
view = view->parent;
|
||||||
if (view->layout == L_TABBED || view->layout == L_STACKED) {
|
if (view->layout == L_TABBED || view->layout == L_STACKED) {
|
||||||
parent = view;
|
parent = view;
|
||||||
}
|
}
|
||||||
} while (view && view->type != C_WORKSPACE);
|
}
|
||||||
|
|
||||||
return parent;
|
return parent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue