fix crash with missing .mid

assert in ARDOUR::MidiRegion::control() boost::shared_ptr<ARDOUR::MidiModel>::operator-> invalid ptr.
see http://pastebin.com/dTV10Zu6
This commit is contained in:
Robin Gareus 2015-08-28 18:48:40 +02:00
parent b0147a7767
commit dca0e6fbe2

View File

@ -513,6 +513,11 @@ MidiTrack::non_realtime_locate (framepos_t pos)
return;
}
/* the source may be missing, but the control still referenced in the GUI */
if (!region->midi_source() || !region->model()) {
return;
}
Glib::Threads::Mutex::Lock lm (_control_lock, Glib::Threads::TRY_LOCK);
if (!lm.locked()) {
return;