From 049816c1451449932f1ed2047f6643d7c7ac8a63 Mon Sep 17 00:00:00 2001 From: Akemi Date: Mon, 30 Jul 2018 19:56:30 +0200 Subject: cocoa-cb: fix crash on macOS 10.10 the colorspace of the layer is only available on 10.11 and upwards. Fixes #6041 --- video/out/cocoa_cb_common.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/video/out/cocoa_cb_common.swift b/video/out/cocoa_cb_common.swift index a4aae9ff2a..1865cc9b5c 100644 --- a/video/out/cocoa_cb_common.swift +++ b/video/out/cocoa_cb_common.swift @@ -241,7 +241,9 @@ class CocoaCB: NSObject { func updateICCProfile() { mpv.setRenderICCProfile(window.screen!.colorSpace!) - layer.colorspace = window.screen!.colorSpace!.cgColorSpace! + if #available(macOS 10.11, *) { + layer.colorspace = window.screen!.colorSpace!.cgColorSpace! + } } func lmuToLux(_ v: UInt64) -> Int { -- cgit v1.2.3