From 1f9b0a86bd577fa72cebb891c749f5422b00599e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 21 Jan 2013 13:20:43 +0000 Subject: [PATCH] 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 --- libs/surfaces/generic_midi/midicontrollable.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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,