Skip to content

Commit

Permalink
check if blurRadius is <= 0.0f in applyBlurOnImage
Browse files Browse the repository at this point in the history
can result in EXC_BAD_ACCESS during image convolution otherwise.
  • Loading branch information
zkwentz committed Apr 8, 2014
1 parent db10172 commit 8573cc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion LiveBlur/LiveBlur/DKLiveBlurView.m
Expand Up @@ -73,7 +73,7 @@ - (void)setScrollView:(UIScrollView *)scrollView {

- (UIImage *)applyBlurOnImage: (UIImage *)imageToBlur
withRadius:(CGFloat)blurRadius {
if ((blurRadius < 0.0f) || (blurRadius > 1.0f)) {
if ((blurRadius <= 0.0f) || (blurRadius > 1.0f)) {
blurRadius = 0.5f;
}

Expand Down

0 comments on commit 8573cc1

Please sign in to comment.