Skip to content

Commit 416fe39

Browse files
mlilbackkostub
authored andcommitted
on macOS 10.13, NSSegmentItemImageView returns nil for layer.backgroundColor. Need to check for this and return a default color (clear)
1 parent 89793d0 commit 416fe39

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

iosMath/render/NSView+backgroundColor.m

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ @implementation NSView (backgroundColor)
1515

1616
- (NSColor *)backgroundColor
1717
{
18+
if (self.layer.backgroundColor == nil) {
19+
return [NSColor clearColor];
20+
}
1821
return [NSColor colorWithCGColor:self.layer.backgroundColor];
1922
}
2023

0 commit comments

Comments
 (0)