From 6a48527a52df21ea1a6f014e55952bddaa54c097 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Sun, 16 Jul 2023 23:16:34 +0200 Subject: [PATCH] Remove unnecessary cast. --- src/Windows/Avalonia.Win32/Automation/RootAutomationNode.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Windows/Avalonia.Win32/Automation/RootAutomationNode.cs b/src/Windows/Avalonia.Win32/Automation/RootAutomationNode.cs index ff8ff69d5e..739f0ac251 100644 --- a/src/Windows/Avalonia.Win32/Automation/RootAutomationNode.cs +++ b/src/Windows/Avalonia.Win32/Automation/RootAutomationNode.cs @@ -33,8 +33,7 @@ namespace Avalonia.Win32.Automation return null; var p = WindowImpl.PointToClient(new PixelPoint((int)x, (int)y)); - var peer = (WindowBaseAutomationPeer)Peer; - var found = InvokeSync(() => peer.GetPeerFromPoint(p)); + var found = InvokeSync(() => Peer.GetPeerFromPoint(p)); var result = GetOrCreate(found) as IRawElementProviderFragment; return result; }