summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-10-02 20:07:40 +0000
committerDavid Robillard <d@drobilla.net>2008-10-02 20:07:40 +0000
commit2e7711cf0f9aff7dbfabccd85cf974fe84128c93 (patch)
treef7b5d60313e03487fe6ff10ee64e991f4791827b /src/engine
parent0a3a94d1f639b595039775f3c4e42e77775f2750 (diff)
downloadingen-2e7711cf0f9aff7dbfabccd85cf974fe84128c93.tar.gz
ingen-2e7711cf0f9aff7dbfabccd85cf974fe84128c93.tar.bz2
ingen-2e7711cf0f9aff7dbfabccd85cf974fe84128c93.zip
Fix loading plugins with garbage extension_data pointers (tsk tsk, swh).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1594 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/LV2Node.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/LV2Node.cpp b/src/engine/LV2Node.cpp
index a06cc55a..9f3be720 100644
--- a/src/engine/LV2Node.cpp
+++ b/src/engine/LV2Node.cpp
@@ -135,6 +135,7 @@ LV2Node::instantiate()
_instances = new Raul::Array<SLV2Instance>(_polyphony, NULL);
uint32_t port_buffer_size = 0;
+ SLV2Value ctx_ext_uri = slv2_value_new_uri(info->lv2_world(), LV2_CONTEXT_MESSAGE);
for (uint32_t i=0; i < _polyphony; ++i) {
(*_instances)[i] = slv2_plugin_instantiate(plug, _srate, info->lv2_features());
@@ -143,6 +144,9 @@ LV2Node::instantiate()
return false;
}
+ if (!slv2_plugin_has_feature(plug, ctx_ext_uri))
+ continue;
+
const void* ctx_ext = slv2_instance_get_extension_data(
(*_instances)[i], LV2_CONTEXT_MESSAGE);
@@ -155,6 +159,8 @@ LV2Node::instantiate()
}
}
+ slv2_value_free(ctx_ext_uri);
+
string port_name;
string port_path;