Remove several exception-throwing asserts from destructors.
[dcpomatic.git] / src / lib / update_checker.cc
index e3bbd663ee254af8abbc68fabf71774edb2141f6..58bc7c1b7436d6743615a56a5da7e3176cebe818 100644 (file)
@@ -86,8 +86,12 @@ UpdateChecker::~UpdateChecker ()
 
        _condition.notify_all ();
        if (_thread) {
-               DCPOMATIC_ASSERT (_thread->joinable ());
-               _thread->join ();
+               /* Ideally this would be a DCPOMATIC_ASSERT(_thread->joinable()) but we
+                  can't throw exceptions from a destructor.
+               */
+               if (_thread->joinable ()) {
+                       _thread->join ();
+               }
        }
        delete _thread;