egl: don't NULL deref the .get_capabilities function pointer
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 7 Aug 2017 16:23:19 +0000 (17:23 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 26 Aug 2017 10:22:17 +0000 (11:22 +0100)
commitf0d053cb6dda908d554d84629bd98e05d383a8f6
tree0bec5e96d06e1e54cfcd7541bc7136cb7a2ff4a4
parent10524d105de7080fd4f85e9ba8d1d149f765433f
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: 0201f01dc4e ("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>
src/egl/drivers/dri2/egl_dri2.c