diff --git a/sway/tree/container.c b/sway/tree/container.c index 6a01eab38..c8d7f96b0 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -74,10 +74,8 @@ void container_destroy(struct sway_container *con) { wlr_texture_destroy(con->marks_unfocused); wlr_texture_destroy(con->marks_urgent); - if (con->view) { - if (con->view->container == con) { - con->view->container = NULL; - } + if (con->view && con->view->container == con) { + con->view->container = NULL; if (con->view->destroying) { view_destroy(con->view); }