[Mac] Fixed NRE and initial position on 64bit
This commit is contained in:
parent
c65e2a4d9e
commit
5b529647c9
1 changed files with 6 additions and 2 deletions
|
@ -206,7 +206,6 @@ namespace OpenTK.Platform.MacOS
|
|||
|
||||
// Set up behavior
|
||||
Cocoa.SendIntPtr(windowPtr, Selector.Get("setDelegate:"), windowPtr); // The window class acts as its own delegate
|
||||
Cocoa.SendVoid(windowPtr, Selector.Get("cascadeTopLeftFromPoint:"), System.Drawing.PointF.Empty);
|
||||
Cocoa.SendVoid(windowPtr, Selector.Get("makeKeyWindow"));
|
||||
SetTitle(title, false);
|
||||
|
||||
|
@ -247,7 +246,12 @@ namespace OpenTK.Platform.MacOS
|
|||
{
|
||||
ResetTrackingArea();
|
||||
}
|
||||
GraphicsContext.CurrentContext.Update(windowInfo);
|
||||
|
||||
var context = GraphicsContext.CurrentContext;
|
||||
if (context != null)
|
||||
{
|
||||
context.Update(windowInfo);
|
||||
}
|
||||
|
||||
if (suppressResize == 0)
|
||||
OnResize(EventArgs.Empty);
|
||||
|
|
Loading…
Reference in a new issue