summaryrefslogtreecommitdiffstats
path: root/src/glx/applegl_glx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/applegl_glx.c')
-rw-r--r--src/glx/applegl_glx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glx/applegl_glx.c b/src/glx/applegl_glx.c
index c086e5146a8..85f70058c64 100644
--- a/src/glx/applegl_glx.c
+++ b/src/glx/applegl_glx.c
@@ -134,6 +134,9 @@ applegl_create_context(struct glx_screen *psc,
/* TODO: Integrate this with apple_glx_create_context and make
* struct apple_glx_context inherit from struct glx_context. */
+ if (!config)
+ return NULL;
+
gc = calloc(1, sizeof(*gc));
if (gc == NULL)
return NULL;