summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Vlad <marius.vlad@collabora.com>2020-02-05 22:00:25 +0200
committerMarius Vlad <marius.vlad@collabora.com>2020-02-06 13:40:11 +0200
commit433edac095bb142e6024314e39409afacbfaa5c2 (patch)
tree3f1a334854ed446db00e69f969d45ed916a3e8de
parentab2e660c891df7188f2803a88d172627d66294fe (diff)
desktop: Remove the surface in all cases
It could happen that the surface was never switched to and maybe is not longer available when we try to search in the surfaces list. Avoids the case where retrieving the app_id name from a desktop surface no longer active causes a memory violation. Bug-AGL: SPEC-3160 Signed-off-by: Marius Vlad <marius.vlad@collabora.com> Change-Id: I0473dc0745bcf4d8bdc55f7ca6b7bc3bb8069a8f
-rw-r--r--src/desktop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/desktop.c b/src/desktop.c
index 26569d6..8c6437d 100644
--- a/src/desktop.c
+++ b/src/desktop.c
@@ -119,9 +119,9 @@ desktop_surface_removed(struct weston_desktop_surface *dsurface, void *userdata)
if (weston_surface_is_mapped(wsurface)) {
weston_desktop_surface_unlink_view(surface->view);
weston_view_destroy(surface->view);
- wl_list_remove(&surface->link);
}
+ wl_list_remove(&surface->link);
free(surface);
}