Rename SafeStringStream -> locked_stringstream. Bump deps for removal of stringstream.
[dcpomatic.git] / src / lib / update_checker.cc
index e3bbd663ee254af8abbc68fabf71774edb2141f6..e6ee851a0c5202a0c49e947a421f065f6ab5864d 100644 (file)
@@ -20,9 +20,9 @@
 
 #include "update_checker.h"
 #include "version.h"
-#include "safe_stringstream.h"
 #include "util.h"
 #include "raw_convert.h"
+#include <locked_sstream.h>
 #include <libcxml/cxml.h>
 #include <curl/curl.h>
 #include <boost/algorithm/string.hpp>
@@ -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;