mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Add assertion
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#import "NSColor Additions.h"
|
||||
#import <OakFoundation/OakFoundation.h>
|
||||
#import <oak/debug.h>
|
||||
|
||||
@implementation NSColor (TMColorAdditions)
|
||||
+ (NSColor*)colorWithString:(NSString*)aString
|
||||
@@ -19,6 +20,7 @@
|
||||
|
||||
+ (NSColor*)tmColorWithCGColor:(CGColorRef)aColor
|
||||
{
|
||||
ASSERT(aColor != nullptr);
|
||||
if([self respondsToSelector:@selector(colorWithCGColor:)])
|
||||
return [self colorWithCGColor:aColor];
|
||||
return [NSColor colorWithColorSpace:[[NSColorSpace alloc] initWithCGColorSpace:CGColorGetColorSpace(aColor)] components:CGColorGetComponents(aColor) count:CGColorGetNumberOfComponents(aColor)];
|
||||
|
||||
Reference in New Issue
Block a user