Fix using NSGraphicsContext in creating a CGImage in NSImage category

This commit is contained in:
Michael Schneider
2016-01-06 14:58:34 +01:00
parent 21bf559066
commit cd20716750

View File

@@ -21,7 +21,7 @@
- (CGImageRef)CGImage
{
NSGraphicsContext *context = [[NSGraphicsContext currentContext] graphicsPort];
NSGraphicsContext *context = [NSGraphicsContext currentContext];
NSRect rect = NSMakeRect(0.0, 0.0, self.size.width, self.size.height);
return [self CGImageForProposedRect:&rect context:context hints:NULL];
}