Browse Source

Merge pull request #5703 from AvaloniaUI/osx-fix-rare-segfault

OSX segfault - add null pointer check.
pull/5719/head
Jumar Macato 6 years ago
committed by GitHub
parent
commit
bb6431b7e4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      native/Avalonia.Native/src/OSX/window.mm

7
native/Avalonia.Native/src/OSX/window.mm

@ -2231,9 +2231,12 @@ protected:
{ {
@autoreleasepool @autoreleasepool
{ {
[Window setContentSize:NSSize{x, y}]; if (Window != nullptr)
{
[Window setContentSize:NSSize{x, y}];
[Window setFrameTopLeftPoint:ToNSPoint(ConvertPointY(lastPositionSet))]; [Window setFrameTopLeftPoint:ToNSPoint(ConvertPointY(lastPositionSet))];
}
return S_OK; return S_OK;
} }

Loading…
Cancel
Save