macosx: Fix crash on 10.7 due to CGColor method
authorMarvin Scholz <epirat07@gmail.com>
Thu, 3 Nov 2016 01:05:08 +0000 (02:05 +0100)
committerMarvin Scholz <epirat07@gmail.com>
Thu, 3 Nov 2016 01:06:10 +0000 (02:06 +0100)
This fixes an issue where VLC would crash on 10.7 doe to usage of the
CGColor method on NSColor which was only introduce in 10.8, leading
to a crash on 10.7.

modules/gui/macosx/VLCFSPanelController.m

index a648708..9bc23ee 100644 (file)
 - (void)injectBackgroundView
 {
     /* Setup the view */
-    NSColor *color = [NSColor colorWithCalibratedWhite:0.0 alpha:0.8];
+    CGColorRef color = CGColorCreateGenericGray(0.0, 0.8);
     NSView *view = [[NSView alloc] initWithFrame:self.window.contentView.frame];
     [view setWantsLayer:YES];
-    [view.layer setBackgroundColor:[color CGColor]];
+    [view.layer setBackgroundColor:color];
     [view.layer setCornerRadius:8.0];
     [view setAutoresizesSubviews:YES];