diff --git a/BTCPayServer.Vault/AvaloniaHackExtensions.cs b/BTCPayServer.Vault/AvaloniaHackExtensions.cs index ffcff8a..ade1911 100644 --- a/BTCPayServer.Vault/AvaloniaHackExtensions.cs +++ b/BTCPayServer.Vault/AvaloniaHackExtensions.cs @@ -39,7 +39,7 @@ public static void ActivateHack(this Window window) if (ReferenceEquals(platformImpl, null)) return; - var platformHandle = platformImpl.Handle; + var platformHandle = window.TryGetPlatformHandle(); if (ReferenceEquals(platformHandle, null)) return; @@ -65,7 +65,7 @@ public static void Blink(this Window window) if (ReferenceEquals(platformImpl, null)) return; - var platformHandle = platformImpl.Handle; + var platformHandle = window.TryGetPlatformHandle(); if (ReferenceEquals(platformHandle, null)) return; var handle = platformHandle.Handle;