fix more close segfaults

This commit is contained in:
Tony Crisci 2018-04-02 21:01:33 -04:00
parent 32ef182f47
commit 2c165e1288
5 changed files with 41 additions and 7 deletions

View file

@ -110,7 +110,7 @@ struct sway_container *container_reap_empty(struct sway_container *container) {
wlr_log(L_DEBUG, "Reaping %p %s '%s'", container,
container_type_to_str(container->type), container->name);
while (container->type != C_ROOT && container->type != C_OUTPUT
&& container->children->length == 0) {
&& container->children && container->children->length == 0) {
if (container->type == C_WORKSPACE) {
if (!workspace_is_visible(container)) {
struct sway_container *parent = container->parent;