From b20e0370aa804bef8e4d6b88630743da76d26b99 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Mon, 2 Sep 2024 19:20:30 +0200 Subject: [PATCH] wayland/color-management: Handle inert feedback surfaces When a surface is destroyed, the existing feedback surfaces are marked as inert by setting the wl_resource user_data to NULL. This wasn't handled in the feedback surface destructor. Fixes: 2341346c90 ("wayland: Implement the color management protocol v4") Part-of: --- src/wayland/meta-wayland-color-management.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wayland/meta-wayland-color-management.c b/src/wayland/meta-wayland-color-management.c index 2dd26d802..6bc624fec 100644 --- a/src/wayland/meta-wayland-color-management.c +++ b/src/wayland/meta-wayland-color-management.c @@ -1204,6 +1204,9 @@ color_management_feedback_surface_destructor (struct wl_resource *resource) MetaWaylandColorManagementSurface *cm_surface = wl_resource_get_user_data (resource); + if (!cm_surface) + return; + cm_surface->feedback_resources = g_list_remove (cm_surface->feedback_resources, resource); }