summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-01 14:07:56 +0100
committerDavid Robillard <d@drobilla.net>2020-12-01 14:14:02 +0100
commit91f5552187ec0e9c56fb6dacc72a5a0166429788 (patch)
tree797f03de11ee7e422734e1a162de5285002877ec /src
parentd77a9f9532fe4412795b433208f80d96f99a2ff1 (diff)
downloadsord-91f5552187ec0e9c56fb6dacc72a5a0166429788.tar.gz
sord-91f5552187ec0e9c56fb6dacc72a5a0166429788.tar.bz2
sord-91f5552187ec0e9c56fb6dacc72a5a0166429788.zip
Add an assertion that the world is not null on node destruction
Diffstat (limited to 'src')
-rw-r--r--src/sord.c3
1 files changed, 3 insertions, 0 deletions
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;