From 1313429f65515210261f4a916efa5310ad41188d Mon Sep 17 00:00:00 2001 From: Diego Waxemberg Date: Sun, 1 Feb 2015 21:09:21 -0500 Subject: [PATCH] Fix static analysis warning --- Limelight/Network/AppAssetManager.m | 3 ++- Limelight/Network/AppAssetRetriever.h | 1 + Limelight/Network/AppAssetRetriever.m | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Limelight/Network/AppAssetManager.m b/Limelight/Network/AppAssetManager.m index d7510a0..a1e7975 100644 --- a/Limelight/Network/AppAssetManager.m +++ b/Limelight/Network/AppAssetManager.m @@ -41,7 +41,8 @@ retriever.app = app; retriever.host = _host; retriever.callback = _callback; - retriever.cache = useCache ? _imageCache : nil; + retriever.cache = _imageCache; + retriever.useCache = useCache; [_opQueue addOperation:retriever]; } } diff --git a/Limelight/Network/AppAssetRetriever.h b/Limelight/Network/AppAssetRetriever.h index 25301e1..a852a79 100644 --- a/Limelight/Network/AppAssetRetriever.h +++ b/Limelight/Network/AppAssetRetriever.h @@ -17,5 +17,6 @@ @property (nonatomic) App* app; @property (nonatomic) NSMutableDictionary* cache; @property (nonatomic) id callback; +@property (nonatomic) BOOL useCache; @end diff --git a/Limelight/Network/AppAssetRetriever.m b/Limelight/Network/AppAssetRetriever.m index 3a220ea..c3cd787 100644 --- a/Limelight/Network/AppAssetRetriever.m +++ b/Limelight/Network/AppAssetRetriever.m @@ -19,7 +19,7 @@ static const double RETRY_DELAY = 1; // seconds - (void) main { UIImage* appImage = nil; while (![self isCancelled] && appImage == nil) { - if (self.cache) { + if (self.useCache) { @synchronized(self.cache) { UIImage* cachedImage = [self.cache objectForKey:self.app.appId]; if (cachedImage != nil) {