diff options
author | David Robillard <d@drobilla.net> | 2020-12-01 14:07:56 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-12-01 14:14:02 +0100 |
commit | 91f5552187ec0e9c56fb6dacc72a5a0166429788 (patch) | |
tree | 797f03de11ee7e422734e1a162de5285002877ec /src | |
parent | d77a9f9532fe4412795b433208f80d96f99a2ff1 (diff) | |
download | sord-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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; |