We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5af1bbb commit e725bccCopy full SHA for e725bcc
ColorSetKit/NSColor+ColorSetKit.m
@@ -49,7 +49,16 @@ + ( nullable NSColor * )colorFromColorSet: ( NSString * )name
49
50
if( MainColorSet == nil )
51
{
52
- MainColorSet = [ [ ColorSet alloc ] initWithPath: [ [ NSBundle mainBundle ] pathForResource: @"Colors" ofType: @"colorset" ] ];
+ {
53
+ NSString * path;
54
+
55
+ path = [ [ NSBundle mainBundle ] pathForResource: @"Colors" ofType: @"colorset" ];
56
57
+ if( path != nil && [ [ NSFileManager defaultManager ] fileExistsAtPath: path ] )
58
59
+ MainColorSet = [ [ ColorSet alloc ] initWithPath: path ];
60
+ }
61
62
}
63
64
[ Lock unlock ];
0 commit comments