Skip to content

Commit 6b137fb

Browse files
committed
Merge pull request SDWebImage#981 from mythodeia/master
initialise kPNGSignatureData data
2 parents 6698910 + b271cbb commit 6b137fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SDWebImage/SDImageCache.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ + (SDImageCache *)sharedImageCache {
4848
static id instance;
4949
dispatch_once(&once, ^{
5050
instance = [self new];
51-
kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8];
5251
});
5352
return instance;
5453
}
@@ -61,6 +60,9 @@ - (id)initWithNamespace:(NSString *)ns {
6160
if ((self = [super init])) {
6261
NSString *fullNamespace = [@"com.hackemist.SDWebImageCache." stringByAppendingString:ns];
6362

63+
// initialise PNG signature data
64+
kPNGSignatureData = [NSData dataWithBytes:kPNGSignatureBytes length:8];
65+
6466
// Create IO serial queue
6567
_ioQueue = dispatch_queue_create("com.hackemist.SDWebImageCache", DISPATCH_QUEUE_SERIAL);
6668

0 commit comments

Comments
 (0)