From 7bb4113a7e9cb62120e96d7c81066f0c055f0db4 Mon Sep 17 00:00:00 2001 From: "Yang, Ying-chao" Date: Wed, 21 Aug 2024 18:25:14 +0800 Subject: [PATCH] core: fix crash caused by exiting without joining running thread (#464) --- src/core/hyprlock.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 5fe99ca..0e1b9de 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -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(); g_pAuth->start();