Permalink
Browse files

Added CGRetainColor/CGReleaseColor to prevent determinate progress co…

…ntroller from crashing
  • Loading branch information...
1 parent 851092f commit 90cdd23335f817d333e5303c2f911e0072d81766 Nick committed Oct 25, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 DZProgressController.m
View
3 DZProgressController.m
@@ -62,9 +62,10 @@ - (void)drawInContext:(CGContextRef)context {
CGRect circleRect = CGRectInset(self.bounds, 1, 1);
CGColorRef borderColor = [[UIColor whiteColor] CGColor];
- CGColorRef backgroundColor = [[UIColor colorWithWhite: 1.0 alpha: 0.15] CGColor];
+ CGColorRef backgroundColor = CGColorRetain([[UIColor colorWithWhite: 1.0 alpha: 0.15] CGColor]);
CGContextSetFillColorWithColor(context, backgroundColor);
+ CGColorRelease(backgroundColor);
CGContextSetStrokeColorWithColor(context, borderColor);
CGContextSetLineWidth(context, 2.0f);

0 comments on commit 90cdd23

Please sign in to comment.