From b0937edeec74b8afe054f313cf9d8d72cd3e3400 Mon Sep 17 00:00:00 2001 From: Hanspeter Portner Date: Thu, 17 Mar 2016 23:01:33 +0100 Subject: [PATCH] Fix blocked patch:Set messages. --- libs/ardour/lv2_plugin.cc | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/libs/ardour/lv2_plugin.cc b/libs/ardour/lv2_plugin.cc index 3b9a3ef286..d707d3e375 100644 --- a/libs/ardour/lv2_plugin.cc +++ b/libs/ardour/lv2_plugin.cc @@ -2464,19 +2464,18 @@ LV2Plugin::connect_and_run(BufferSet& bufs, _uri_map.urids.patch_value, &value, 0); - if (!property || !value || - property->type != _uri_map.urids.atom_URID || - value->type != _uri_map.urids.atom_Path) { + if (property && value && + property->type == _uri_map.urids.atom_URID && + value->type == _uri_map.urids.atom_Path) { + const uint32_t prop_id = ((const LV2_Atom_URID*)property)->body; + const char* path = (const char*)LV2_ATOM_BODY_CONST(value); + + // Emit PropertyChanged signal for UI + // TODO: This should emit the control's Changed signal + PropertyChanged(prop_id, Variant(Variant::PATH, path)); + } else { std::cerr << "warning: patch:Set for unknown property" << std::endl; - continue; } - - const uint32_t prop_id = ((const LV2_Atom_URID*)property)->body; - const char* path = (const char*)LV2_ATOM_BODY_CONST(value); - - // Emit PropertyChanged signal for UI - // TODO: This should emit the control's Changed signal - PropertyChanged(prop_id, Variant(Variant::PATH, path)); } } }