Don't fail when trying to join the timer thread.
authorMilian Wolff <mail@milianw.de>
Mon, 22 Dec 2014 13:03:21 +0000 (14:03 +0100)
committerMilian Wolff <mail@milianw.de>
Mon, 22 Dec 2014 13:03:21 +0000 (14:03 +0100)
libheaptrack.cpp

index 19b44a761c6f8c13ee435d4781a74b9d011221fc..4d20aa30514fb75e5f5f776c813b17f976e911ce 100644 (file)
@@ -450,7 +450,11 @@ private:
         {
             debugLog<MinimalOutput>("%s", "destroying LockedData");
             stopTimerThread = true;
-            timerThread.join();
+            if (timerThread.joinable()) {
+                try {
+                    timerThread.join();
+                } catch(std::system_error) {}
+            }
 
             if (out) {
                 fclose(out);