This commit is contained in:
Kovid Goyal 2020-11-01 18:47:31 +05:30
commit 0870a33956
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1994,8 +1994,10 @@ int _glfwPlatformCreateCursor(_GLFWcursor* cursor,
bitmapFormat:NSBitmapFormatAlphaNonpremultiplied
bytesPerRow:src->width * 4
bitsPerPixel:32];
if (rep == nil)
if (rep == nil) {
[native release];
return false;
}
memcpy([rep bitmapData], src->pixels, src->width * src->height * 4);
[native addRepresentation:rep];