Skip to content

Commit e1266e4

Browse files
committed
Log an error message when imageTable can't be found
1 parent d756f28 commit e1266e4

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

FastImageCache/FICImageCache.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,13 @@ - (void)setImage:(UIImage *)image forEntity:(id <FICEntity>)entity withFormatNam
290290

291291
NSString *entityUUID = [entity UUID];
292292
FICImageTable *imageTable = [_imageTables objectForKey:formatName];
293-
[imageTable deleteEntryForEntityUUID:entityUUID];
293+
if (imageTable) {
294+
[imageTable deleteEntryForEntityUUID:entityUUID];
294295

295-
[self _processImage:image forEntity:entity withFormatName:formatName completionBlocksDictionary:completionBlocksDictionary];
296+
[self _processImage:image forEntity:entity withFormatName:formatName completionBlocksDictionary:completionBlocksDictionary];
297+
} else {
298+
[self _logMessage:[NSString stringWithFormat:@"*** FIC Error: %s Couldn't find image table with format name %@", __PRETTY_FUNCTION__, formatName]];
299+
}
296300
}
297301
}
298302

0 commit comments

Comments
 (0)