From d5263be35549a368bac601e17ca7a7e825b6e7e1 Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Sun, 29 Aug 2021 13:57:07 -0500 Subject: [PATCH] scene: make graph loops fatal when debugging --- types/wlr_scene.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/types/wlr_scene.c b/types/wlr_scene.c index f35870bc0..19132d9aa 100644 --- a/types/wlr_scene.c +++ b/types/wlr_scene.c @@ -141,9 +141,7 @@ void wlr_scene_node_reparent(struct wlr_scene_node *node, /* Ensure that a node cannot become its own ancestor */ for (struct wlr_scene_node *ancestor = new_parent; ancestor != NULL; ancestor = ancestor->parent) { - if (ancestor == node) { - return; - } + assert(ancestor != node); } wl_list_remove(&node->state.link);