core: fix crash caused by exiting without joining running thread (#464)

This commit is contained in:
Yang, Ying-chao 2024-08-21 18:25:14 +08:00 committed by GitHub
parent f673759d01
commit 7bb4113a7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -405,8 +405,14 @@ void CHyprlock::run() {
acquireSessionLock();
if (m_bTerminate) // Recieved finished
// Recieved finished
if (m_bTerminate) {
m_sLoopState.timerEvent = true;
m_sLoopState.timerCV.notify_all();
g_pRenderer->asyncResourceGatherer->notify();
g_pRenderer->asyncResourceGatherer->await();
exit(1);
}
g_pAuth = std::make_unique<CAuth>();
g_pAuth->start();