From d543393e3f79609ca6411af0108814e56979f464 Mon Sep 17 00:00:00 2001 From: lwouis Date: Fri, 21 Feb 2025 21:20:29 +0100 Subject: [PATCH] fix: app would sometimes crash (closes #4244) --- src/api-wrappers/AXUIElement.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api-wrappers/AXUIElement.swift b/src/api-wrappers/AXUIElement.swift index f5f4e8bf..398b388a 100644 --- a/src/api-wrappers/AXUIElement.swift +++ b/src/api-wrappers/AXUIElement.swift @@ -204,7 +204,7 @@ extension AXUIElement { /// with only normal approach: we miss other-Spaces windows /// with only brute-force approach: we miss windows when the app launches (e.g. launch Note.app: first window is not found by brute-force) func allWindows(_ pid: pid_t) throws -> [AXUIElement] { - let aWindows = try! windows() + let aWindows = try windows() let bWindows = AXUIElement.windowsByBruteForce(pid) return Array(Set(aWindows + bWindows)) }