diff options
Diffstat (limited to 'src/mac_gl.m')
-rw-r--r-- | src/mac_gl.m | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mac_gl.m b/src/mac_gl.m index dd94e54..25704c3 100644 --- a/src/mac_gl.m +++ b/src/mac_gl.m @@ -135,6 +135,9 @@ static PuglStatus puglMacGlEnter(PuglView* view, const PuglExposeEvent* PUGL_UNUSED(expose)) { PuglOpenGLView* const drawView = (PuglOpenGLView*)view->impl->drawView; + if (!drawView) { + return PUGL_FAILURE; + } [[drawView openGLContext] makeCurrentContext]; return PUGL_SUCCESS; |