From 1de740955f82ba6b3b3c0385f0d88106b7a6c9ac Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 16 Sep 2014 12:11:34 -0600 Subject: [PATCH] wayland: Don't leak the existing texture if we already have one We were missing a check in ensure_buffer_texture that checked if we already had a CoglTexture bound for the buffer. --- src/wayland/meta-wayland-surface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c index 771154ac1..c231b4184 100644 --- a/src/wayland/meta-wayland-surface.c +++ b/src/wayland/meta-wayland-surface.c @@ -151,6 +151,9 @@ ensure_buffer_texture (MetaWaylandBuffer *buffer) CoglError *catch_error = NULL; CoglTexture *texture; + if (buffer->texture) + return; + texture = COGL_TEXTURE (cogl_wayland_texture_2d_new_from_buffer (ctx, buffer->resource, &catch_error));