diff --git a/libs/pbd/pbd/abstract_ui.cc b/libs/pbd/pbd/abstract_ui.cc index e186161cf9..b0e26e3cb5 100644 --- a/libs/pbd/pbd/abstract_ui.cc +++ b/libs/pbd/pbd/abstract_ui.cc @@ -80,7 +80,21 @@ AbstractUI::AbstractUI (const string& name) { Glib::Threads::Mutex::Lock lm (request_buffer_map_lock); for (vector::iterator t = tbm.begin(); t != tbm.end(); ++t) { - request_buffers[t->emitting_thread] = static_cast (t->request_buffer); + RequestBuffer* rb = static_cast (t->request_buffer); + + /* it could be dead */ + + if (!rb->dead) { + request_buffers[t->emitting_thread] = rb; + } else { + /* don't delete it, because we have no way to + remove it from the + EventLoop::thread_request_buffers map here, + which means that we will rediscover the + pointer in the future, and indirect to check + "dead". + */ + } } } }