From cd320a7ccd392a5da2df31ec5edc9b07db5befab Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 7 Mar 2015 06:35:22 +0000 Subject: Fix unload functions to only unload the necessary data. Previously, it was quite likely that a massive subset of the entire world was removed as well. Oops. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5616 a436a847-0d15-0410-975c-d299462d15a1 --- src/world.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/world.c b/src/world.c index 9c758e8..566c862 100644 --- a/src/world.c +++ b/src/world.c @@ -564,8 +564,7 @@ lilv_world_load_dyn_manifest(LilvWorld* world, #endif // LILV_DYN_MANIFEST } -static -LilvNode* +static LilvNode* lilv_world_get_manifest_uri(LilvWorld* world, LilvNode* bundle_uri) { SerdNode manifest_uri = lilv_new_uri_relative_to_base( @@ -629,7 +628,8 @@ static int lilv_world_drop_graph(LilvWorld* world, LilvNode* graph) { SordIter* i = sord_search(world->model, NULL, NULL, NULL, graph->node); - while (!sord_iter_end(i)) { + while (!sord_iter_end(i) && + sord_node_equals(sord_iter_get_node(i, SORD_GRAPH), graph->node)) { const SerdStatus st = sord_erase(world->model, i); if (st) { LILV_ERRORF("Error removing statement from <%s> (%s)\n", -- cgit v1.2.1