Skip to content

Commit

Permalink
Merge pull request #285 from lb90/check-egl-support-at-runtime
Browse files Browse the repository at this point in the history
Check for EGL support at runtime before calling into EGL functions
  • Loading branch information
ebassi authored Nov 11, 2024
2 parents f13c13c + 1a2ad51 commit e98617e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dispatch_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,9 @@ epoxy_egl_get_current_gl_context_api(void)
{
EGLint curapi;

if (!api.egl_handle)
return EGL_NONE;

if (eglQueryContext(eglGetCurrentDisplay(), eglGetCurrentContext(),
EGL_CONTEXT_CLIENT_TYPE, &curapi) == EGL_FALSE) {
(void)eglGetError();
Expand Down

0 comments on commit e98617e

Please sign in to comment.