summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-13 06:58:44 +0000
committerDavid Robillard <d@drobilla.net>2007-10-13 06:58:44 +0000
commit84e2c5cbda9e6e01aba73b36cf8d4136b56eeef0 (patch)
tree0928d5bb235349c7f657d52800cdbc3d1bc6b56d /src
parent47f13051fd842fb9726bb782e0bedf62683cc9d8 (diff)
downloadingen-84e2c5cbda9e6e01aba73b36cf8d4136b56eeef0.tar.gz
ingen-84e2c5cbda9e6e01aba73b36cf8d4136b56eeef0.tar.bz2
ingen-84e2c5cbda9e6e01aba73b36cf8d4136b56eeef0.zip
Fix crash when control dragging on MIDI or OSC ports.
git-svn-id: http://svn.drobilla.net/lad/ingen@878 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/libs/gui/Port.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libs/gui/Port.cpp b/src/libs/gui/Port.cpp
index b02c0856..04d45f1d 100644
--- a/src/libs/gui/Port.cpp
+++ b/src/libs/gui/Port.cpp
@@ -108,9 +108,13 @@ Port::activity()
void
Port::set_control(float value, bool signal)
{
+ if (_port_model->type() != DataType::CONTROL && _port_model->type() != DataType::AUDIO)
+ return;
+
if (signal)
App::instance().engine()->set_port_value_immediate(_port_model->path(), "ingen:control",
sizeof(float), &value);
+
FlowCanvas::Port::set_control(value);
}