egl/dri: don't crash when createImageFromRenderbuffer2 is NULL
authorEmil Velikov <emil.velikov@collabora.com>
Tue, 10 Oct 2017 17:50:13 +0000 (18:50 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 13 Oct 2017 11:56:12 +0000 (12:56 +0100)
commit872a373bc829b7eb6d94063023934b3713185d75
tree19ed8ce11e7cab200ad2ed1b9260ecb739ff73ef
parent2289964f4f2aede298317d89bc96d9e2aa3ff766
egl/dri: don't crash when createImageFromRenderbuffer2 is NULL

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>
src/egl/drivers/dri2/egl_dri2.c