diff options
author | David Robillard <d@drobilla.net> | 2006-06-11 18:54:30 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-06-11 18:54:30 +0000 |
commit | f4ec5ca9e739d009af64757d4cd9b715d88f3068 (patch) | |
tree | fe6a5e5e6d20ad3400e897e40abbc55fd2b62f0b | |
parent | af72224cba09c873c1f8e81d7bd9db9747f9553d (diff) | |
download | lilv-f4ec5ca9e739d009af64757d4cd9b715d88f3068.tar.gz lilv-f4ec5ca9e739d009af64757d4cd9b715d88f3068.tar.bz2 lilv-f4ec5ca9e739d009af64757d4cd9b715d88f3068.zip |
Catch broken plugins, messily for now
git-svn-id: http://svn.drobilla.net/lad/libslv2@24 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/plugin.c | 1 | ||||
-rw-r--r-- | src/plugininstance.c | 9 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/plugin.c b/src/plugin.c index 8c7a4cc..29083e8 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -171,7 +171,6 @@ slv2_plugin_get_num_ports(const SLV2Plugin* p) rasqal_init(); - rasqal_query_results* results = slv2_plugin_run_query(p, U("SELECT DISTINCT ?value FROM data: WHERE { \n" "plugin: lv2:port ?value . \n" diff --git a/src/plugininstance.c b/src/plugininstance.c index 40de08c..8ff9e54 100644 --- a/src/plugininstance.c +++ b/src/plugininstance.c @@ -66,7 +66,7 @@ slv2_plugin_instantiate(const SLV2Plugin* plugin, dlclose(lib); break; // return NULL } else if (!strcmp(ld->URI, (char*)plugin->plugin_uri)) { - //printf("Found %s at index %ld in:\n\t%s\n\n", plugin->plugin_uri, i, lib_path); + printf("Found %s at index %ld in:\n\t%s\n\n", plugin->plugin_uri, i, lib_path); assert(ld->instantiate); @@ -82,6 +82,13 @@ slv2_plugin_instantiate(const SLV2Plugin* plugin, } } + assert(result); + assert(slv2_plugin_get_num_ports(plugin) > 0); + + // Connect all ports to NULL (catches bugs) + for (unsigned long i=0; i < slv2_plugin_get_num_ports(plugin); ++i) + result->descriptor->connect_port(result->lv2_handle, i, NULL); + return result; } |