diff options
author | Emil Velikov <[email protected]> | 2017-05-15 16:14:15 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-05-29 16:59:12 +0100 |
commit | 701311425ee5f2e7b39bcb5e4ef4fa45c01cf836 (patch) | |
tree | e548af5152d03cbe3060574ac628db601f345be8 /src | |
parent | 46cc022d5d392802e60415cc2d0da3969c8d6981 (diff) |
egl: error out on eglCreateWaylandBufferFromImageWL
Currently f one does the silly thing by probing the entry point w/o
checking the extension they will attempt to use the extension even
though it cannot work.
That is due our of of an assert which gets removed in release builds.
Simply error out if the extension is not enabled. Thus we can
apply some cleanups with next commits.
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/egl/main/eglapi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 9cea2f41fff..431678f8bd6 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -2132,7 +2132,8 @@ eglCreateWaylandBufferFromImageWL(EGLDisplay dpy, EGLImage image) _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_FALSE); _EGL_CHECK_DISPLAY(disp, NULL, drv); - assert(disp->Extensions.WL_create_wayland_buffer_from_image); + if (!disp->Extensions.WL_create_wayland_buffer_from_image) + RETURN_EGL_EVAL(disp, NULL); img = _eglLookupImage(image, disp); |