1
0
Fork 0

cogl/egl: Explicitly initialize age variable

In case of error, it's untouched by EGL, which probably means an
invalid read.

https://gitlab.gnome.org/GNOME/mutter/merge_requests/906
This commit is contained in:
Carlos Garnacho 2019-10-30 14:17:04 +01:00 committed by Georges Basile Stavracas Neto
parent ee4638ef5c
commit d47324e8d7

View file

@ -699,7 +699,7 @@ _cogl_winsys_onscreen_get_buffer_age (CoglOnscreen *onscreen)
CoglDisplayEGL *egl_display = context->display->winsys;
EGLSurface surface = egl_onscreen->egl_surface;
static gboolean warned = FALSE;
int age;
int age = 0;
if (!(egl_renderer->private_features & COGL_EGL_WINSYS_FEATURE_BUFFER_AGE))
return 0;