diff options
-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; } |