summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-10-21 22:15:42 +0200
committerDavid Robillard <d@drobilla.net>2019-10-21 22:15:42 +0200
commit884d4131f636d637274f077abc3f0387307af820 (patch)
treea4a2d6102812f343b97619a261b8debb72502c0c
parent7a7bff205975ac1668f71da1a7af172ead100849 (diff)
downloadlilv-884d4131f636d637274f077abc3f0387307af820.tar.gz
lilv-884d4131f636d637274f077abc3f0387307af820.tar.bz2
lilv-884d4131f636d637274f077abc3f0387307af820.zip
Fix memory error in Python World.unload_resource()
This is pretty ridiculous behaviour on behalf of the GC, if you ask me.
-rw-r--r--bindings/python/lilv.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bindings/python/lilv.py b/bindings/python/lilv.py
index bfff997..cc4101e 100644
--- a/bindings/python/lilv.py
+++ b/bindings/python/lilv.py
@@ -1257,7 +1257,9 @@ class World(Structure):
This unloads all data loaded by a previous call to
load_resource() with the given `resource`.
"""
- return c.world_unload_resource(self.world, _as_uri(resource).node)
+ uri = _as_uri(resource)
+ ret = c.world_unload_resource(self.world, uri.node)
+ return ret
def get_plugin_class(self):
"""Get the parent of all other plugin classes, lv2:Plugin."""