diff options
Diffstat (limited to 'src/egl/drivers/dri2/platform_drm.c')
-rw-r--r-- | src/egl/drivers/dri2/platform_drm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index d18c73cb338..d59009f3d2e 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -323,10 +323,9 @@ dri2_drm_get_buffers_with_format(__DRIdrawable *driDrawable, struct dri2_egl_surface *dri2_surf = loaderPrivate; int i, j; - dri2_surf->buffer_count = 0; for (i = 0, j = 0; i < 2 * count; i += 2, j++) { assert(attachments[i] < __DRI_BUFFER_COUNT); - assert(dri2_surf->buffer_count < 5); + assert(j < ARRAY_SIZE(dri2_surf->buffers)); switch (attachments[i]) { case __DRI_BUFFER_BACK_LEFT: |