From 1bc11bb8077031101fd05a4ddb877404f4eb6829 Mon Sep 17 00:00:00 2001 From: kanato Date: Sun, 15 Nov 2009 22:00:14 +0000 Subject: [PATCH] MacOS: Fix crash in CheckEnterLeaveEvents if using WinForms too. --- Source/OpenTK/Platform/MacOS/CarbonGLNative.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs b/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs index df28debc..ee8a247a 100644 --- a/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs +++ b/Source/OpenTK/Platform/MacOS/CarbonGLNative.cs @@ -563,6 +563,9 @@ namespace OpenTK.Platform.MacOS private void CheckEnterLeaveEvents(IntPtr eventWindowRef, Point pt) { + if (window == null) + return; + bool thisIn = eventWindowRef == window.WindowRef; if (pt.Y < 0)