summaryrefslogtreecommitdiffstats
path: root/src/libs/gui
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-09 03:45:24 +0000
committerDavid Robillard <d@drobilla.net>2007-10-09 03:45:24 +0000
commitb98fd4bc7b8548cc2be538a91ce799fabbd3054f (patch)
tree1b48099e550d83eb138d886f3bb643a90071f5f0 /src/libs/gui
parent531cd8958765315a5340ba94487d655023acd758 (diff)
downloadingen-b98fd4bc7b8548cc2be538a91ce799fabbd3054f.tar.gz
ingen-b98fd4bc7b8548cc2be538a91ce799fabbd3054f.tar.bz2
ingen-b98fd4bc7b8548cc2be538a91ce799fabbd3054f.zip
Fix OSC patching.
Add OSC "bang" LV2 plugin, with GUI (just a button). Make OSC metronome suck slightly less. git-svn-id: http://svn.drobilla.net/lad/ingen@857 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/gui')
-rw-r--r--src/libs/gui/NodeModule.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index a0ca3992..1f4f8d91 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -111,7 +111,8 @@ NodeModule::control_change(uint32_t index, float control)
if (_slv2_ui) {
const LV2UI_Descriptor* const ui_descriptor = slv2_ui_instance_get_descriptor(_slv2_ui);
LV2UI_Handle ui_handle = slv2_ui_instance_get_handle(_slv2_ui);
- ui_descriptor->port_event(ui_handle, index, 4, &control);
+ if (ui_descriptor->port_event)
+ ui_descriptor->port_event(ui_handle, index, 4, &control);
}
}
@@ -190,9 +191,11 @@ NodeModule::embed_gui(bool embed)
_gui_item = NULL;
}
- slv2_ui_instance_free(_slv2_ui);
- _slv2_ui = NULL;
- _gui = NULL;
+ if (_slv2_ui) {
+ slv2_ui_instance_free(_slv2_ui);
+ _slv2_ui = NULL;
+ _gui = NULL;
+ }
_ports_y_offset = 0;
_minimum_width = 0; // resize() takes care of it..