From 0e24f9c0d55fcd9a5b2461a865d0e5dc2ea195c8 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Fri, 21 Feb 2025 16:58:17 +0000 Subject: [PATCH] anr: add a note for no pid dialogs --- src/managers/ANRManager.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/managers/ANRManager.cpp b/src/managers/ANRManager.cpp index af1cb93a..3793f27f 100644 --- a/src/managers/ANRManager.cpp +++ b/src/managers/ANRManager.cpp @@ -155,6 +155,11 @@ void CANRManager::SANRData::killDialog() const { if (!dialogProc) return; + if (!dialogProc->pid()) { + Debug::log(ERR, "ANR: cannot kill dialogProc, as it doesn't have a pid. If you have hyprutils <= 0.6.0, you will crash soon. Otherwise, dialog failed to spawn??"); + return; + } + kill(dialogProc->pid(), SIGKILL); }