mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 18:01:29 +00:00
Fix crash when unmapping last child of a tabbed workspace
* Create layout T[view view] * Move the cursor into the title bar area * Close both views Sway would crash because container_at_tabbed would attempt to divide by zero when there are no children. The children check isn't needed for the stacked function because it doesn't divide anything by the number of children. Fixes #2636.
This commit is contained in:
parent
9f985f1f1c
commit
09733e233f
|
@ -202,6 +202,9 @@ static struct sway_container *container_at_tabbed(struct sway_node *parent,
|
||||||
}
|
}
|
||||||
struct sway_seat *seat = input_manager_current_seat(input_manager);
|
struct sway_seat *seat = input_manager_current_seat(input_manager);
|
||||||
list_t *children = node_get_children(parent);
|
list_t *children = node_get_children(parent);
|
||||||
|
if (!children->length) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
// Tab titles
|
// Tab titles
|
||||||
int title_height = container_titlebar_height();
|
int title_height = container_titlebar_height();
|
||||||
|
|
Loading…
Reference in a new issue