diff options
author | David Robillard <d@drobilla.net> | 2008-10-02 20:07:40 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2008-10-02 20:07:40 +0000 |
commit | 2e7711cf0f9aff7dbfabccd85cf974fe84128c93 (patch) | |
tree | f7b5d60313e03487fe6ff10ee64e991f4791827b /src | |
parent | 0a3a94d1f639b595039775f3c4e42e77775f2750 (diff) | |
download | ingen-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')
-rw-r--r-- | src/engine/LV2Node.cpp | 6 | ||||
-rw-r--r-- | src/module/wscript | 2 |
2 files changed, 7 insertions, 1 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; diff --git a/src/module/wscript b/src/module/wscript index e97ceb9a..70a49bd7 100644 --- a/src/module/wscript +++ b/src/module/wscript @@ -9,7 +9,7 @@ def build(bld): global.cpp ''' obj.includes = ['..', '../common'] - obj.defines = 'INGEN_MODULE_DIR=\\\"' + bld.env()['PREFIX'] + 'lib/ingen/\\\"' + obj.defines = 'INGEN_MODULE_DIR=\\\"' + bld.env()['PREFIX'] + 'lib/ingen\\\"' obj.name = 'libingen_module' obj.target = 'ingen_module' obj.vnum = '0.0.0' |