From e686f5a2493abf917e344d935504f5e293bf585c Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 21 Jul 2015 17:22:14 +0200 Subject: [PATCH] Fixed AppKit not initialized for cursor creation. --- src/cocoa_window.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index b03632c0..69c37565 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1189,6 +1189,9 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor, NSImage* native; NSBitmapImageRep* rep; + if (!initializeAppKit()) + return GL_FALSE; + rep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:image->width @@ -1224,6 +1227,9 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor, int _glfwPlatformCreateStandardCursor(_GLFWcursor* cursor, int shape) { + if (!initializeAppKit()) + return GL_FALSE; + cursor->ns.object = getStandardCursor(shape); if (!cursor->ns.object) {