Skip to content

Commit e98617e

Browse files
authored
Merge pull request #285 from lb90/check-egl-support-at-runtime
Check for EGL support at runtime before calling into EGL functions
2 parents f13c13c + 1a2ad51 commit e98617e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/dispatch_common.c

+3
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,9 @@ epoxy_egl_get_current_gl_context_api(void)
783783
{
784784
EGLint curapi;
785785

786+
if (!api.egl_handle)
787+
return EGL_NONE;
788+
786789
if (eglQueryContext(eglGetCurrentDisplay(), eglGetCurrentContext(),
787790
EGL_CONTEXT_CLIENT_TYPE, &curapi) == EGL_FALSE) {
788791
(void)eglGetError();

0 commit comments

Comments
 (0)