mirror of https://github.com/djcb/mu.git
threads: avoid assert
The assert failure was spotted in the wild... we need to investigate, but we can ignore it now to avoid SIGABRT.
This commit is contained in:
parent
086999c2d1
commit
3e64fdfb0f
|
@ -292,8 +292,13 @@ prune_empty_containers (Container& container)
|
|||
|
||||
if (container.children.empty()) {
|
||||
// If it is an empty container with no children, nuke it.
|
||||
if (container.parent)
|
||||
container.parent->remove_child(container);
|
||||
if (container.parent) {
|
||||
if (!container.parent->has_child(container)) {
|
||||
container.parent = {};
|
||||
g_warning ("unexpected parent->child relation");
|
||||
} else
|
||||
container.parent->remove_child(container);
|
||||
}
|
||||
container.is_nuked = true;
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue