aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevin J. Pohly <djpohly@gmail.com>2021-08-29 13:57:07 -0500
committerSimon Ser <contact@emersion.fr>2021-08-30 16:43:18 +0200
commitd5263be35549a368bac601e17ca7a7e825b6e7e1 (patch)
tree0e6376e72c92b4bcb5a35077566517af6ca4c24b
parent0f534e32e4f1d021a1faca6ecbb694c7f4808761 (diff)
scene: make graph loops fatal when debugging
-rw-r--r--types/wlr_scene.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/types/wlr_scene.c b/types/wlr_scene.c
index f35870bc..19132d9a 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);