diff options
Diffstat (limited to 'src/x11_gl.c')
-rw-r--r-- | src/x11_gl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/x11_gl.c b/src/x11_gl.c index 1ebe829..41007cd 100644 --- a/src/x11_gl.c +++ b/src/x11_gl.c @@ -103,6 +103,9 @@ static PuglStatus puglX11GlEnter(PuglView* view, const PuglExposeEvent* PUGL_UNUSED(expose)) { PuglX11GlSurface* surface = (PuglX11GlSurface*)view->impl->surface; + if (!surface || !surface->ctx) { + return PUGL_FAILURE; + } return glXMakeCurrent(view->impl->display, view->impl->win, surface->ctx) ? PUGL_SUCCESS |