compositor: Free the right EGLImage

We forgot to index the image array and freed image[0] multiple times
dev
Kristian Høgsberg 13 years ago
parent 4901f6ceea
commit 971cbc8c9e
  1. 2
      src/compositor.c

@ -779,7 +779,7 @@ weston_surface_attach(struct wl_surface *surface, struct wl_buffer *buffer)
EGL_WAYLAND_BUFFER_COMPONENTS_WL, EGL_WAYLAND_BUFFER_COMPONENTS_WL,
&components)) { &components)) {
for (i = 0; i < es->num_images; i++) for (i = 0; i < es->num_images; i++)
ec->destroy_image(ec->egl_display, es->images[0]); ec->destroy_image(ec->egl_display, es->images[i]);
es->num_images = 0; es->num_images = 0;
switch (components) { switch (components) {

Loading…
Cancel
Save