From 65f6f556d93907acb604b79ffba96777cde0dc54 Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Mon, 9 Oct 2023 22:08:34 +0300 Subject: layer-shell: check for NULL in wlr_layer_surface_v1_destroy() --- types/wlr_layer_shell_v1.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c index 0c00a8f7..1e83e3b7 100644 --- a/types/wlr_layer_shell_v1.c +++ b/types/wlr_layer_shell_v1.c @@ -293,6 +293,9 @@ uint32_t wlr_layer_surface_v1_configure(struct wlr_layer_surface_v1 *surface, } void wlr_layer_surface_v1_destroy(struct wlr_layer_surface_v1 *surface) { + if (surface == NULL) { + return; + } zwlr_layer_surface_v1_send_closed(surface->resource); layer_surface_destroy(surface); } -- cgit v1.2.3