Skip to content

Commit

Permalink
Don't crash when a misbehaving app calls Show on a closed/closing win…
Browse files Browse the repository at this point in the history
…dow on macOS (#16341)

yolo merging coz of integration tests being flaky, with @grokys 's approval
  • Loading branch information
jmacato authored Jul 17, 2024
1 parent 5521baa commit 945b371
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Avalonia.Native/WindowImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Avalonia.Input.TextInput;
using Avalonia.Native.Interop;
using Avalonia.Platform;
using MicroCom.Runtime;

namespace Avalonia.Native
{
Expand Down Expand Up @@ -156,6 +157,9 @@ protected override bool ChromeHitTest (RawPointerEventArgs e)

private void InvalidateExtendedMargins()
{
if(_native is MicroComProxyBase pb && pb.IsDisposed)
return;

if (WindowState == WindowState.FullScreen)
{
ExtendedMargins = new Thickness();
Expand Down

0 comments on commit 945b371

Please sign in to comment.