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:
parent
21f123c69f
commit
1de740955f
1 changed files with 3 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue