Browse Source

prevent popup crashing when mainwindow has closed and popup still open.

pull/4548/head
Dan Walmsley 6 years ago
parent
commit
c607b1a4dc
  1. 9
      src/Avalonia.Native/WindowImplBase.cs

9
src/Avalonia.Native/WindowImplBase.cs

@ -94,8 +94,13 @@ namespace Avalonia.Native
{
get
{
var s = _native.GetClientSize();
return new Size(s.Width, s.Height);
if (_native != null)
{
var s = _native.GetClientSize();
return new Size(s.Width, s.Height);
}
return default;
}
}

Loading…
Cancel
Save