aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/tree/container.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sway/tree/container.c b/sway/tree/container.c
index 329145cf..baaa82fd 100644
--- a/sway/tree/container.c
+++ b/sway/tree/container.c
@@ -67,12 +67,10 @@ void container_destroy(struct sway_container *con) {
list_free(con->outputs);
if (con->view) {
- struct sway_view *view = con->view;
- view->container = NULL;
- free(view->title_format);
- view->title_format = NULL;
-
- if (view->destroying) {
+ if (con->view->container == con) {
+ con->view->container = NULL;
+ }
+ if (con->view->destroying) {
view_destroy(con->view);
}
}