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:
@@ -2315,7 +2315,9 @@ gl_renderer_attach_egl(struct weston_surface *es, struct weston_buffer *buffer)
|
|||||||
attribs);
|
attribs);
|
||||||
if (!gb->images[i]) {
|
if (!gb->images[i]) {
|
||||||
weston_log("failed to create img for plane %d\n", 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);
|
glActiveTexture(GL_TEXTURE0 + i);
|
||||||
|
|||||||
Reference in New Issue
Block a user