egl/gbm: Fix compiler warning about visual matching.

The compiler doesn't know that num_visuals > 0.

Fixes: 37a8d907cc ("egl/gbm: Ensure EGLConfigs match GBM surface format")
Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
Eric Anholt 2018-02-10 16:32:57 +00:00 committed by Daniel Stone
parent 831fb29252
commit 0b97eb02b0

View file

@ -95,7 +95,7 @@ dri2_drm_config_is_compatible(struct dri2_egl_display *dri2_dpy,
const __DRIconfig *config,
struct gbm_surface *surface)
{
const struct gbm_dri_visual *visual;
const struct gbm_dri_visual *visual = NULL;
unsigned int red, green, blue, alpha;
int i;