iosMath icon indicating copy to clipboard operation
iosMath copied to clipboard

Crash in NSView+backgroundColor, line 19

Open joshuabryson opened this issue 7 years ago • 1 comments

If the layer's background color is nil, it crashes. I notice this happening then presenting an open or save dialog on macOS. It seems that the background for the side folders has a bill layer background color.

Quick fix is to check if the layer.backgroundColor is nil. If not return the NSColor with that color, of so return nil:

- (NSColor *)backgroundColor
{
    
    if (self.layer.backgroundColor){
        return [NSColor colorWithCGColor:self.layer.backgroundColor];
    } else {
        return nil;
    }
} 

joshuabryson avatar May 15 '18 14:05 joshuabryson

Thanks for finding the bug! Can you please create a Pull Request for this change?

kostub avatar May 17 '18 05:05 kostub