Stop threads at the start of their object's destruction in all Job cases.
[dcpomatic.git] / src / lib / job.cc
index 04aa227b7a46c749f03c6ae56e6eb43a66645f38..a83249e798feba99abafc2a09f1393eb8cf5dc18 100644 (file)
@@ -62,7 +62,10 @@ Job::Job (shared_ptr<const Film> film)
 
 Job::~Job ()
 {
-       stop_thread ();
+#ifdef DCPOMATIC_DEBUG
+       /* Any subclass should have called stop_thread in its destructor */
+       assert (!_thread.joinable());
+#endif
 }
 
 void