diff options
Diffstat (limited to 'src/world.c')
-rw-r--r-- | src/world.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/world.c b/src/world.c index b608261..d08e32d 100644 --- a/src/world.c +++ b/src/world.c @@ -335,15 +335,12 @@ lilv_lib_compare(const void* a, const void* b, void* user_data) static ZixTreeIter* lilv_collection_find_by_uri(const ZixTree* seq, const LilvNode* uri) { - if (!lilv_node_is_uri(uri)) { - return NULL; + ZixTreeIter* i = NULL; + if (lilv_node_is_uri(uri)) { + struct LilvHeader key = { NULL, (LilvNode*)uri }; + zix_tree_find(seq, &key, &i); } - - struct LilvHeader key = { NULL, (LilvNode*)uri }; - ZixTreeIter* i = NULL; - const ZixStatus st = zix_tree_find(seq, &key, &i); - - return st ? NULL : i; + return i; } /** Get an element of a collection of any object with an LilvHeader by URI. */ |