summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugininstance.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/plugininstance.c b/src/plugininstance.c
index 1566c7d..9db7d26 100644
--- a/src/plugininstance.c
+++ b/src/plugininstance.c
@@ -35,6 +35,12 @@ slv2_plugin_instantiate(const SLV2Plugin* plugin,
{
struct _Instance* result = NULL;
+ bool local_host_features = (host_features == NULL);
+ if (local_host_features) {
+ host_features = malloc(sizeof(LV2_Host_Feature));
+ host_features[0] = NULL;
+ }
+
const char* const lib_path = slv2_plugin_get_library_path(plugin);
if (!lib_path)
return NULL;
@@ -90,6 +96,9 @@ slv2_plugin_instantiate(const SLV2Plugin* plugin,
for (uint32_t i=0; i < slv2_plugin_get_num_ports(plugin); ++i)
result->descriptor->connect_port(result->lv2_handle, i, NULL);
+ if (local_host_features)
+ free(host_features);
+
return result;
}