mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-03 16:28:08 +02:00
egl: check for NULL value like eglGetSyncAttribKHR does
Commitd1e1563bb6added a NULL check for eglGetSyncAttribKHR but eglGetSyncAttrib does not do this. Patch adds same check to happen with eglGetSyncAttrib. Fixes crashes in (when exposing EGL 1.5): dEQP-EGL.functional.fence_sync.invalid.get_invalid_value Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Eric Engestrom <eric.engestrom@intel.com> Cc: mesa-stable@lists.freedesktop.org (cherry picked from commit99cbec0a5f)
This commit is contained in:
parent
3b0e591228
commit
1ee0add2a5
1 changed files with 4 additions and 0 deletions
|
|
@ -2064,6 +2064,10 @@ eglGetSyncAttrib(EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *valu
|
|||
_EGLDisplay *disp = _eglLockDisplay(dpy);
|
||||
_EGLSync *s = _eglLookupSync(sync, disp);
|
||||
_EGL_FUNC_START(disp, EGL_OBJECT_SYNC_KHR, s, EGL_FALSE);
|
||||
|
||||
if (!value)
|
||||
RETURN_EGL_ERROR(disp, EGL_BAD_PARAMETER, EGL_FALSE);
|
||||
|
||||
return _eglGetSyncAttribCommon(disp, s, attribute, value);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue