summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-08-03 21:50:48 +0000
committerDavid Robillard <d@drobilla.net>2012-08-03 21:50:48 +0000
commit95b4e327f1fe223bd83ff85488b8edf125c9681b (patch)
tree8d85df96fb11b617b0d3373ba37d8e1d9e48bc1b /src
parent5ee3e71a8522a7b09a02680ba8e34a69674c7880 (diff)
downloadlilv-95b4e327f1fe223bd83ff85488b8edf125c9681b.tar.gz
lilv-95b4e327f1fe223bd83ff85488b8edf125c9681b.tar.bz2
lilv-95b4e327f1fe223bd83ff85488b8edf125c9681b.zip
Fix crash when invalid plugin URIs are used.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4614 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/world.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/world.c b/src/world.c
index b26ff55..9ebdaac 100644
--- a/src/world.c
+++ b/src/world.c
@@ -267,6 +267,10 @@ struct LilvHeader*
lilv_collection_get_by_uri(const ZixTree* const_seq,
const LilvNode* uri)
{
+ if (!lilv_node_is_uri(uri)) {
+ return NULL;
+ }
+
ZixTree* seq = (ZixTree*)const_seq;
struct LilvHeader key = { NULL, (LilvNode*)uri };