diff --git a/lib/tlTimeline/Player.cpp b/lib/tlTimeline/Player.cpp index 693efd200..ddca94cee 100644 --- a/lib/tlTimeline/Player.cpp +++ b/lib/tlTimeline/Player.cpp @@ -130,9 +130,12 @@ namespace tl } catch (const std::exception& e) { - std::stringstream ss; - ss << "Cannot open create RtAudio instance: " << e.what(); - context->log("tl::timeline::Player", ss.str(), log::Type::Error); + if (auto context = getContext().lock()) + { + std::stringstream ss; + ss << "Cannot open create RtAudio instance: " << e.what(); + context->log("tl::timeline::Player", ss.str(), log::Type::Error); + } } if (!p.thread.rtAudio) {