The __DRI_IMAGE version can be 17 or over, while the function pointer is
NULL. Guard for that instead of crashing.
Fixes: bad24395d91 ("egl/dri: use createImageFromRenderbuffer2 when
available")
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
return EGL_NO_IMAGE_KHR;
}
- if (dri2_dpy->image->base.version >= 17) {
+ if (dri2_dpy->image->base.version >= 17 &&
+ dri2_dpy->image->createImageFromRenderbuffer2) {
unsigned error = ~0;
dri_image = dri2_dpy->image->createImageFromRenderbuffer2(