Browse Source

Add null check,

Customer was seeing a crash in this method, don't have a repro but other uses of `_parent` are surrounded by a null check so this makes sense I think.
pull/9716/head
Steven Kirk 4 years ago
parent
commit
102b1b351b
  1. 3
      native/Avalonia.Native/src/OSX/AvnWindow.mm

3
native/Avalonia.Native/src/OSX/AvnWindow.mm

@ -281,6 +281,9 @@
- (void)windowDidBecomeKey:(NSNotification *_Nonnull)notification
{
if (_parent == nullptr)
return;
_parent->BringToFront();
dispatch_async(dispatch_get_main_queue(), ^{

Loading…
Cancel
Save