From 9e11ef4f39e53277be03384fc3f51b6b50ddd08e Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 7 Jul 2022 16:04:56 +0200 Subject: [PATCH] MixerScene: handle edge-case with midi-cc/bender controllables --- libs/pbd/controllable.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libs/pbd/controllable.cc b/libs/pbd/controllable.cc index 43c385349c..4cdd134559 100644 --- a/libs/pbd/controllable.cc +++ b/libs/pbd/controllable.cc @@ -151,7 +151,12 @@ Controllable::registered_controllables () ControllableSet rv; Glib::Threads::RWLock::ReaderLock lm (registry_lock); for (auto const& i : registry) { - rv.insert (i->shared_from_this ()); + try { + rv.insert (i->shared_from_this ()); + } catch (...) { + /* ignore boost::bad_weak_ptr */ + // cout << "No shared ctrl: " << i->name() << "\n"; + } } return rv; }