Fix crash from backup observer thread because the condition variable is not yet initialized when the thread starts

This commit is contained in:
David Capello 2019-06-06 12:15:53 -03:00
parent bf649df9f2
commit 7ce45c0017

View File

@ -51,11 +51,12 @@ namespace crash {
bool m_done;
std::mutex m_mutex;
std::thread m_thread;
// Used to wakeup the backgroundThread() when we have to stop the
// thread that saves backups (i.e. when we are closing the application).
std::condition_variable m_wakeup;
std::thread m_thread;
};
} // namespace crash