vlc | branch: master | Marvin Scholz <[email protected]> | Thu Nov  3 02:05:08 
2016 +0100| [c4eb40b4b68812daa3697224d1b26e000fac8ec9] | committer: Marvin 
Scholz

macosx: Fix crash on 10.7 due to CGColor method

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c4eb40b4b68812daa3697224d1b26e000fac8ec9
---

 modules/gui/macosx/VLCFSPanelController.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/gui/macosx/VLCFSPanelController.m 
b/modules/gui/macosx/VLCFSPanelController.m
index a648708..9bc23ee 100644
--- a/modules/gui/macosx/VLCFSPanelController.m
+++ b/modules/gui/macosx/VLCFSPanelController.m
@@ -394,10 +394,10 @@
 - (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];
 

_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to