mirror of
https://github.com/swaywm/sway.git
synced 2025-11-04 13:29:52 -05:00
fix some segfaults
This commit is contained in:
parent
2aec85bf24
commit
eda425fdab
3 changed files with 19 additions and 11 deletions
|
|
@ -106,11 +106,11 @@ void container_add_child(struct sway_container *parent,
|
|||
}
|
||||
|
||||
struct sway_container *container_reap_empty(struct sway_container *container) {
|
||||
if (!sway_assert(container, "reaping null container")) {
|
||||
if (container == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
wlr_log(L_DEBUG, "reaping %p %s", container, container->name);
|
||||
while (container != &root_container && container->children->length == 0) {
|
||||
while (container->type != C_VIEW && container != &root_container && container->children->length == 0) {
|
||||
if (container->type == C_WORKSPACE) {
|
||||
if (!workspace_is_visible(container)) {
|
||||
struct sway_container *parent = container->parent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue