diff options
Diffstat (limited to 'macosx/HBToolbarBadgedItem.m')
-rw-r--r-- | macosx/HBToolbarBadgedItem.m | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/macosx/HBToolbarBadgedItem.m b/macosx/HBToolbarBadgedItem.m index 135174701..e1eec2066 100644 --- a/macosx/HBToolbarBadgedItem.m +++ b/macosx/HBToolbarBadgedItem.m @@ -85,7 +85,7 @@ #pragma mark -- Private Methods -- (CGColorRef)HB_NSColorToCGColor:(NSColor *)color +- (CGColorRef)copyNSColorToCGColor:(NSColor *)color { // CGColor property of NSColor has been added only in 10.8, // we need to support 10.7 too. @@ -178,7 +178,9 @@ CGContextAddArcToPoint(context, maxx, maxy, midx, maxy, radius); CGContextAddArcToPoint(context, minx, maxy, minx, midy, radius); CGContextClosePath(context); - CGContextSetFillColorWithColor(context, [self HB_NSColorToCGColor:_badgeFillColor]); + CGColorRef fillColor = [self copyNSColorToCGColor:_badgeFillColor]; + CGContextSetFillColorWithColor(context,fillColor); + CFRelease(fillColor); CGContextDrawPath(context, kCGPathFill); // Draw the text |