Don't throw when nil is passed to [NSImage imageNamed]

This commit is contained in:
Lubos Dolezel 2020-02-14 14:19:20 +01:00
parent c796e5c8d6
commit 51b54ea0d7

View File

@ -164,6 +164,9 @@ NSImageName const NSImageNameTouchBarRecordStopTemplate = @"NSTouchBarRecordStop
}
+imageNamed:(NSString *)name {
if (name == nil)
return nil;
NSImage *image=[[self allImages] objectForKey:name];
if(image==nil){
NSArray *bundles=[self _checkBundles];