mirror of
https://github.com/darlinghq/darling-cocotron.git
synced 2024-11-27 05:50:27 +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 {
|
+imageNamed:(NSString *)name {
|
||||||
|
if (name == nil)
|
||||||
|
return nil;
|
||||||
|
|
||||||
NSImage *image=[[self allImages] objectForKey:name];
|
NSImage *image=[[self allImages] objectForKey:name];
|
||||||
if(image==nil){
|
if(image==nil){
|
||||||
NSArray *bundles=[self _checkBundles];
|
NSArray *bundles=[self _checkBundles];
|
||||||
|
Loading…
Reference in New Issue
Block a user