summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-28 20:05:22 +0000
committerDavid Robillard <d@drobilla.net>2006-10-28 20:05:22 +0000
commit75473961a3322945dc11ddcff6d6498ec1e4d94d (patch)
tree6a2664363ef415e2ca3e253f201ac015ea5ffe01 /src
parent75068bb8dc9ae3d6711a5d8548c0c3ede0654f47 (diff)
downloadlilv-75473961a3322945dc11ddcff6d6498ec1e4d94d.tar.gz
lilv-75473961a3322945dc11ddcff6d6498ec1e4d94d.tar.bz2
lilv-75473961a3322945dc11ddcff6d6498ec1e4d94d.zip
Clarified lv2.h header for HostFeatures parameter, associated changes to SLV2.
git-svn-id: http://svn.drobilla.net/lad/slv2@195 a436a847-0d15-0410-975c-d299462d15a1
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;
}