summaryrefslogtreecommitdiff
path: root/src/dispatch_egl.c
diff options
context:
space:
mode:
authorGianfranco Costamagna <costamagnagianfranco@yahoo.it>2017-04-24 16:10:28 +0200
committerGianfranco Costamagna <costamagnagianfranco@yahoo.it>2017-04-24 17:22:37 +0200
commit106eae7aad23dffcefe11ec3bf86e54e35137689 (patch)
treebc430cf95d348630511e272e0a104410971e5372 /src/dispatch_egl.c
parent5b6d99069b3fa0d4e12ee617b144a51312bcea79 (diff)
downloadlibepoxy-106eae7aad23dffcefe11ec3bf86e54e35137689.tar.gz
epoxy_internal_has_gl_extension, epoxy_egl_version: add some missing nullpointer checks from https://bugzilla.redhat.com/show_bug.cgi?id=1395366
Related commit: b3b8bd9af7bf1fcfe544fd131f4d4f0d117ae7bc Fix "epoxy_glx_version" to handle the case when GLX is not active on the display. Patch is tweak from the original version posted by Tom Horsley
Diffstat (limited to 'src/dispatch_egl.c')
-rw-r--r--src/dispatch_egl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/dispatch_egl.c b/src/dispatch_egl.c
index 50e66dd..f555a58 100644
--- a/src/dispatch_egl.c
+++ b/src/dispatch_egl.c
@@ -65,6 +65,9 @@ epoxy_egl_version(EGLDisplay dpy)
int ret;
version_string = eglQueryString(dpy, EGL_VERSION);
+ if (!version_string)
+ return 0;
+
ret = sscanf(version_string, "%d.%d", &major, &minor);
assert(ret == 2);
return major * 10 + minor;