diff options
author | David Robillard <d@drobilla.net> | 2007-10-03 22:21:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-03 22:21:16 +0000 |
commit | 47c8ed163b98b307fa4f7412e59760ccff8e630f (patch) | |
tree | ceae86f8a9010aceb1cdd73ee791e1573d21dc29 /src/plugin.c | |
parent | 26eede34411b65b484970b2e3524ff7419f58305 (diff) | |
download | lilv-47c8ed163b98b307fa4f7412e59760ccff8e630f.tar.gz lilv-47c8ed163b98b307fa4f7412e59760ccff8e630f.tar.bz2 lilv-47c8ed163b98b307fa4f7412e59760ccff8e630f.zip |
Fix Plugin class related bugs.
git-svn-id: http://svn.drobilla.net/lad/slv2@814 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugin.c')
-rw-r--r-- | src/plugin.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/src/plugin.c b/src/plugin.c index b6789c6..73a3ebf 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -163,27 +163,30 @@ slv2_plugin_load(SLV2Plugin p) NULL, query, p->plugin_uri); librdf_query_results* results = librdf_query_execute(q, p->rdf); - + while (!librdf_query_results_finished(results)) { librdf_node* class_node = librdf_query_results_get_binding_value(results, 0); librdf_uri* class_uri = librdf_node_get_uri(class_node); const char* class_uri_str = (const char*)librdf_uri_as_string(class_uri); - SLV2PluginClass plugin_class = slv2_plugin_classes_get_by_uri( - p->world->plugin_classes, class_uri_str); - - librdf_free_node(class_node); + if ( ! librdf_uri_equals(class_uri, p->world->lv2_plugin_class->uri) ) { + + SLV2PluginClass plugin_class = slv2_plugin_classes_get_by_uri( + p->world->plugin_classes, class_uri_str); + + librdf_free_node(class_node); - if (plugin_class) { - p->plugin_class = plugin_class; - break; + if (plugin_class) { + p->plugin_class = plugin_class; + break; + } } librdf_query_results_next(results); } if (p->plugin_class == NULL) - p->plugin_class = raptor_sequence_get_at(p->world->plugin_classes, 0); // lv2:Plugin + p->plugin_class = p->world->lv2_plugin_class; librdf_free_query_results(results); librdf_free_query(q); |