From 394dc81ff3da416fc76472796dcda2902f46244f Mon Sep 17 00:00:00 2001 From: Vaxry Date: Tue, 20 Feb 2024 03:05:51 +0000 Subject: [PATCH] core: wait for poll threads to exit to avoid a coredump --- src/core/hyprlock.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/hyprlock.cpp b/src/core/hyprlock.cpp index 6c6ebed..b4bdf01 100644 --- a/src/core/hyprlock.cpp +++ b/src/core/hyprlock.cpp @@ -246,6 +246,10 @@ void CHyprlock::run() { wl_display_disconnect(m_sWaylandState.display); + // wait for threads to exit cleanly to avoid a coredump + pollThr.join(); + timersThr.join(); + Debug::log(LOG, "Reached the end, exiting"); }