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.
This commit is contained in:
Jasper St. Pierre 2014-09-16 12:11:34 -06:00
parent 21f123c69f
commit 1de740955f

View File

@ -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));