mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-23 12:09:51 +00:00
Don't throw when nil is passed to [NSImage imageNamed]
This commit is contained in:
parent
c796e5c8d6
commit
51b54ea0d7
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user