gl-renderer: Don't leak EGLImages on import fail
This only happens for the legacy renderer, but still, might as well clean up after ourselves when we can't import a secondary plane. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
4519461439
commit
bb624754f1
@ -2315,7 +2315,9 @@ gl_renderer_attach_egl(struct weston_surface *es, struct weston_buffer *buffer)
|
||||
attribs);
|
||||
if (!gb->images[i]) {
|
||||
weston_log("failed to create img for plane %d\n", i);
|
||||
continue;
|
||||
while (--i >= 0)
|
||||
egl_image_unref(gb->images[i]);
|
||||
return;
|
||||
}
|
||||
|
||||
glActiveTexture(GL_TEXTURE0 + i);
|
||||
|
Loading…
Reference in New Issue
Block a user