From 3ef0fc38670904213f8dc1535349e04766baaf62 Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Fri, 4 Jan 2019 17:24:42 +0100 Subject: [PATCH] view_destroy: unmap surface if it isn't yet Otherwise, we're left with an invalid link in the view list. --- view.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/view.c b/view.c index 2ee8a67..b932805 100644 --- a/view.c +++ b/view.c @@ -97,6 +97,9 @@ view_destroy(struct cg_view *view) struct cg_server *server = view->server; bool terminate = view_is_primary(view); + if (view->wlr_surface != NULL) { + view_unmap(view); + } free(view); /* If this was our primary view, exit. */