diff --git a/gdk/gdkdmabuf.c b/gdk/gdkdmabuf.c index 97d9b45497..005ec63ae9 100644 --- a/gdk/gdkdmabuf.c +++ b/gdk/gdkdmabuf.c @@ -346,7 +346,7 @@ gdk_dmabuf_direct_downloader_do_download (GdkTexture *texture, continue; } - sizes[i] = lseek (dmabuf->planes[0].fd, 0, SEEK_END); + sizes[i] = lseek (dmabuf->planes[i].fd, 0, SEEK_END); if (sizes[i] == (off_t) -1) { g_warning ("Failed to seek dmabuf: %s", g_strerror (errno));