From 4ad739ec63c9a11f0537a884ae2a4c56d6bab10b Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 20 Apr 2024 20:16:42 +0100 Subject: HookSystem: improve callback safety --- src/debug/HyprNotificationOverlay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/debug/HyprNotificationOverlay.cpp') diff --git a/src/debug/HyprNotificationOverlay.cpp b/src/debug/HyprNotificationOverlay.cpp index dffa6889..2f00d978 100644 --- a/src/debug/HyprNotificationOverlay.cpp +++ b/src/debug/HyprNotificationOverlay.cpp @@ -3,7 +3,7 @@ #include CHyprNotificationOverlay::CHyprNotificationOverlay() { - g_pHookSystem->hookDynamic("focusedMon", [&](void* self, SCallbackInfo& info, std::any param) { + static auto P = g_pHookSystem->hookDynamic("focusedMon", [&](void* self, SCallbackInfo& info, std::any param) { if (m_dNotifications.size() == 0) return; -- cgit v1.2.3