diff --git a/src/slic3r/GUI/MediaPlayCtrl.cpp b/src/slic3r/GUI/MediaPlayCtrl.cpp index c364ab765..da0b16bda 100644 --- a/src/slic3r/GUI/MediaPlayCtrl.cpp +++ b/src/slic3r/GUI/MediaPlayCtrl.cpp @@ -23,6 +23,7 @@ #endif #include +#include "wx/evtloop.h" namespace Slic3r { namespace GUI { @@ -104,7 +105,9 @@ MediaPlayCtrl::~MediaPlayCtrl() m_tasks.push_back(""); m_cond.notify_all(); } - m_thread.join(); + while (!m_thread.try_join_for(boost::chrono::milliseconds(10))) { + wxEventLoopBase::GetActive()->Yield(); + } } wxString hide_id_middle_string(wxString const &str, size_t offset = 0, size_t length = -1)