mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
egl: don't NULL deref the .get_capabilities function pointer
One could easily introduce version 3 of the DRI2fenceExtension, extending the struct, while not implementing the above function. Thus we'll end up with NULL pointer, and dereferencing it won't fare too well. Fixes:0201f01dc4("egl: add EGL_ANDROID_native_fence_sync") Cc: Rob Clark <robclark@freedesktop.org> Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com> (cherry picked from commitf0d053cb6d)
This commit is contained in:
parent
72a90be2c8
commit
47b22fdf7f
1 changed files with 2 additions and 1 deletions
|
|
@ -681,7 +681,8 @@ dri2_setup_screen(_EGLDisplay *disp)
|
|||
disp->Extensions.KHR_wait_sync = EGL_TRUE;
|
||||
if (dri2_dpy->fence->get_fence_from_cl_event)
|
||||
disp->Extensions.KHR_cl_event2 = EGL_TRUE;
|
||||
if (dri2_dpy->fence->base.version >= 2) {
|
||||
if (dri2_dpy->fence->base.version >= 2 &&
|
||||
dri2_dpy->fence->get_capabilities) {
|
||||
unsigned capabilities =
|
||||
dri2_dpy->fence->get_capabilities(dri2_dpy->dri_screen);
|
||||
disp->Extensions.ANDROID_native_fence_sync =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue