summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/context.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c
index d3cdcac3b7..6c8821f6c7 100644
--- a/video/out/opengl/context.c
+++ b/video/out/opengl/context.c
@@ -138,12 +138,15 @@ static void *get_native_display(void *priv, const char *name)
void ra_gl_ctx_uninit(struct ra_ctx *ctx)
{
- if (ctx->ra)
- ctx->ra->fns->destroy(ctx->ra);
if (ctx->swapchain) {
+ struct priv *p = ctx->swapchain->priv;
+ if (ctx->ra && p->wrapped_fb)
+ ra_tex_free(ctx->ra, &p->wrapped_fb);
talloc_free(ctx->swapchain);
ctx->swapchain = NULL;
}
+
+ ra_free(&ctx->ra);
}
static const struct ra_swapchain_fns ra_gl_swapchain_fns;