diff options
author | Robin Gareus <robin@gareus.org> | 2015-09-06 12:39:53 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2015-09-06 12:39:53 +0200 |
commit | e161bc0596b6cb8facdefc56435553f76ee643c3 (patch) | |
tree | 7eb500857142e86e1e370a44d4f253694d52e784 /gtk2_ardour/audio_region_view.cc | |
parent | ef3a42faed07d51a6485e50662c9e93996042426 (diff) |
fix peak-thread, GUI-thread race condition
Diffstat (limited to 'gtk2_ardour/audio_region_view.cc')
-rw-r--r-- | gtk2_ardour/audio_region_view.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gtk2_ardour/audio_region_view.cc b/gtk2_ardour/audio_region_view.cc index 4f963a290d..bbee73c115 100644 --- a/gtk2_ardour/audio_region_view.cc +++ b/gtk2_ardour/audio_region_view.cc @@ -1125,6 +1125,14 @@ AudioRegionView::create_one_wave (uint32_t which, bool /*direct*/) { //cerr << "AudioRegionView::create_one_wave() called which: " << which << " this: " << this << endl;//DEBUG RouteTimeAxisView& atv (*(dynamic_cast<RouteTimeAxisView*>(&trackview))); // ick + if (!trackview.session() || trackview.session()->deletion_in_progress () || !atv.track()) { + /* peaks_ready_handler() may be called from peak_thread_work() while + * session deletion is in progress. + * Since session-unload happens in the GUI thread, we need to test + * in this context. + */ + return; + } uint32_t nchans = atv.track()->n_channels().n_audio(); uint32_t n; uint32_t nwaves = std::min (nchans, audio_region()->n_channels()); |