From 91f5552187ec0e9c56fb6dacc72a5a0166429788 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 1 Dec 2020 14:07:56 +0100 Subject: Add an assertion that the world is not null on node destruction --- src/sord.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/sord.c b/src/sord.c index 557e11d..19e11cd 100644 --- a/src/sord.c +++ b/src/sord.c @@ -714,6 +714,9 @@ sord_node_free_internal(SordWorld* world, SordNode* node) { assert(node->refs == 0); + // If you hit this, the world has probably been destroyed too early + assert(world); + // Cache pointer to buffer to free after node removal and destruction const uint8_t* const buf = node->node.buf; -- cgit v1.2.1