summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video/cocoa/wnd_quartz.mm2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm
index 8549100d9..edc9c5008 100644
--- a/src/video/cocoa/wnd_quartz.mm
+++ b/src/video/cocoa/wnd_quartz.mm
@@ -318,6 +318,8 @@ bool WindowQuartzSubdriver::SetVideoMode(int width, int height, int bpp)
[this->window setColorSpace:[NSColorSpace sRGBColorSpace]];
this->color_space = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
+ if (this->color_space == nullptr) this->color_space = CGColorSpaceCreateDeviceRGB();
+ if (this->color_space == nullptr) error("Could not get a valid colour space for drawing.");
bool ret = WindowResized();
this->UpdatePalette(0, 256);