From 2e7711cf0f9aff7dbfabccd85cf974fe84128c93 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 2 Oct 2008 20:07:40 +0000 Subject: 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 --- src/engine/LV2Node.cpp | 6 ++++++ src/module/wscript | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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(_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' -- cgit v1.2.1