summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/plugininstance.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/plugininstance.c b/src/plugininstance.c
index 9db7d26..edc6e4f 100644
--- a/src/plugininstance.c
+++ b/src/plugininstance.c
@@ -92,6 +92,13 @@ slv2_plugin_instantiate(const SLV2Plugin* plugin,
assert(result);
assert(slv2_plugin_get_num_ports(plugin) > 0);
+ // Failed to instantiate
+ if (result->lv2_handle == NULL) {
+ //printf("Failed to instantiate %s\n", plugin->plugin_uri);
+ free(result);
+ return NULL;
+ }
+
// "Connect" all ports to NULL (catches bugs)
for (uint32_t i=0; i < slv2_plugin_get_num_ports(plugin); ++i)
result->descriptor->connect_port(result->lv2_handle, i, NULL);