summaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-03-07 06:35:22 +0000
committerDavid Robillard <d@drobilla.net>2015-03-07 06:35:22 +0000
commitcd320a7ccd392a5da2df31ec5edc9b07db5befab (patch)
tree04a2ed7ef271a0d030ccbd77cdf13f7c79d07826 /src/world.c
parent763dd22767ebc4e4124a02be383265ec6e3ef491 (diff)
downloadlilv-cd320a7ccd392a5da2df31ec5edc9b07db5befab.tar.gz
lilv-cd320a7ccd392a5da2df31ec5edc9b07db5befab.tar.bz2
lilv-cd320a7ccd392a5da2df31ec5edc9b07db5befab.zip
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
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c6
1 files changed, 3 insertions, 3 deletions
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",