summaryrefslogtreecommitdiff
path: root/sway/tree/layout.c
diff options
context:
space:
mode:
authorTony Crisci <[email protected]>2018-03-31 18:52:02 -0400
committerTony Crisci <[email protected]>2018-03-31 18:52:02 -0400
commiteda425fdabb4050eb2ecc8741793d83e3a7bf154 (patch)
tree234918f83c38f0c494b8f0a04dff5704459bdbe6 /sway/tree/layout.c
parent2aec85bf241f4bad59a23e8492e91d3e7add6ab6 (diff)
fix some segfaults
Diffstat (limited to 'sway/tree/layout.c')
-rw-r--r--sway/tree/layout.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/tree/layout.c b/sway/tree/layout.c
index 62df19e9..5098c8d1 100644
--- a/sway/tree/layout.c
+++ b/sway/tree/layout.c
@@ -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;