From ee122c9c2a6c6d0e9286ee434375245f4ed5d04c Mon Sep 17 00:00:00 2001 From: Kirill Primak Date: Sun, 22 May 2022 10:36:25 +0300 Subject: [PATCH] scene/output: check for NULL in destructor --- types/scene/wlr_scene.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 2435edef..303325fd 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -969,6 +969,10 @@ static void scene_node_remove_output(struct wlr_scene_node *node, } void wlr_scene_output_destroy(struct wlr_scene_output *scene_output) { + if (scene_output == NULL) { + return; + } + scene_node_remove_output(&scene_output->scene->node, scene_output); wlr_addon_finish(&scene_output->addon);