Permalink
Browse files

Fixes bug crash when setting the cover image to nil.

  • Loading branch information...
1 parent 1dc3079 commit 9c3ceb3d1dfe30118f0a6a9c46f62e105047fd9a Devin Ross committed Jul 24, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/TapkuLibrary/TKCoverflowCoverView.m
@@ -80,6 +80,13 @@ - (id) initWithFrame:(CGRect)frame {
- (void) setImage:(UIImage *)img{
+ if(img==nil){
+ imageView.frame = CGRectZero;
+ reflected.frame = CGRectZero;
+ reflected.image = imageView.image = nil;
+ return;
+ }
+
UIImage *image = img;
float w = image.size.width;
@@ -108,7 +115,6 @@ - (UIImage*) image{
}
- (void) setBaseline:(float)f{
baseline = f;
- [self setNeedsDisplay];
}

0 comments on commit 9c3ceb3

Please sign in to comment.