mesa/etnaviv: guard unmapImage call

We may call this function only in case mapImage was successful.

Issue #4329.
This commit is contained in:
Josef Söntgen 2021-09-24 17:51:59 +02:00 committed by Christian Helmuth
parent d39af2206c
commit 8155505b41

View File

@ -91,8 +91,10 @@ dri2_genode_etnaviv_swap_buffers(_EGLDisplay *disp, _EGLSurface *draw)
dri2_genode_etnaviv_put_image(dri2_surf->dri_drawable, 0, 0, 0,
dri2_surf->base.Width, dri2_surf->base.Height,
(char *)data, (void *)dri2_surf);
dri2_dpy->image->unmapImage(dri2_ctx->dri_context,
dri2_surf->back_image, map_data);
}
dri2_dpy->image->unmapImage(dri2_ctx->dri_context, dri2_surf->back_image, map_data);
return EGL_TRUE;
}