Skip to content

Commit

Permalink
fix: prevent rare crash seen in app center
Browse files Browse the repository at this point in the history
Stacktrace:

function signature specialization <Arg[1] = Dead> of generic specialization <[__C.AXUIElementRef]> of (extension in AltTab):__C.AXUIElementRef.attribute<A>(Swift.String, A.Type) throws -> A? AXUIElement.swift:36
  • Loading branch information
lwouis committed Sep 8, 2020
1 parent 6ed97c4 commit 6ca58b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api-wrappers/AXUIElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extension AXUIElement {
return try axCallWhichCanThrow(AXUIElementGetPid(self, &pid), &pid)
}

func attribute<T>(_ key: String, _ type: T.Type) throws -> T? {
func attribute<T>(_ key: String, _ _: T.Type) throws -> T? {
var value: AnyObject?
return try axCallWhichCanThrow(AXUIElementCopyAttributeValue(self, key as CFString, &value), &value) as? T
}
Expand Down

0 comments on commit 6ca58b1

Please sign in to comment.