Fix crash condition + invalid image orientation (fix #206)
This commit is contained in:
parent
28f720ea32
commit
57f0700618
|
@ -64,7 +64,10 @@
|
|||
|
||||
- (void)cancelCurrentImageLoad
|
||||
{
|
||||
[[SDWebImageManager sharedManager] cancelForDelegate:self];
|
||||
@synchronized(self)
|
||||
{
|
||||
[[SDWebImageManager sharedManager] cancelForDelegate:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)webImageManager:(SDWebImageManager *)imageManager didProgressWithPartialImage:(UIImage *)image forURL:(NSURL *)url
|
||||
|
|
|
@ -83,7 +83,7 @@ NS_INLINE UIImage *SDScaledImageForPath(NSString *path, NSObject *imageOrData)
|
|||
}
|
||||
}
|
||||
|
||||
UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:UIImageOrientationUp];
|
||||
UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation];
|
||||
SDWISafeRelease(image)
|
||||
image = scaledImage;
|
||||
}
|
||||
|
|
|
@ -129,7 +129,10 @@
|
|||
|
||||
- (void)cancelCurrentImageLoad
|
||||
{
|
||||
[[SDWebImageManager sharedManager] cancelForDelegate:self];
|
||||
@synchronized(self)
|
||||
{
|
||||
[[SDWebImageManager sharedManager] cancelForDelegate:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)webImageManager:(SDWebImageManager *)imageManager didProgressWithPartialImage:(UIImage *)image forURL:(NSURL *)url userInfo:(NSDictionary *)info
|
||||
|
|
|
@ -64,7 +64,10 @@
|
|||
|
||||
- (void)cancelCurrentImageLoad
|
||||
{
|
||||
[[SDWebImageManager sharedManager] cancelForDelegate:self];
|
||||
@synchronized(self)
|
||||
{
|
||||
[[SDWebImageManager sharedManager] cancelForDelegate:self];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)webImageManager:(SDWebImageManager *)imageManager didProgressWithPartialImage:(UIImage *)image forURL:(NSURL *)url
|
||||
|
|
Loading…
Reference in New Issue