diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-21 13:20:43 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-21 13:20:43 +0000 |
commit | 1f9b0a86bd577fa72cebb891c749f5422b00599e (patch) | |
tree | a815a03ab8a4956258945d70e7c7ed0e1aa1f73e /libs/surfaces/generic_midi/midicontrollable.cc | |
parent | 76f74b9c88976706424a7782affeb243bc40dd60 (diff) |
fix crash when deleting a processor with a controllable (#5284)
git-svn-id: svn://localhost/ardour2/branches/3.0@13943 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/generic_midi/midicontrollable.cc')
-rw-r--r-- | libs/surfaces/generic_midi/midicontrollable.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/surfaces/generic_midi/midicontrollable.cc b/libs/surfaces/generic_midi/midicontrollable.cc index 488ac557bb..d36ccefd44 100644 --- a/libs/surfaces/generic_midi/midicontrollable.cc +++ b/libs/surfaces/generic_midi/midicontrollable.cc @@ -122,7 +122,11 @@ MIDIControllable::set_controllable (Controllable* c) controllable = c; - last_controllable_value = controllable->get_value(); + if (controllable) { + last_controllable_value = controllable->get_value(); + } else { + last_controllable_value = 0.0f; // is there a better value? + } if (controllable) { controllable->Destroyed.connect (controllable_death_connection, MISSING_INVALIDATOR, |