vo_gpu: opengl: make sure to always clean up debug callbacks

In theory this mostly happens automatically, especially after the 5
vsync limit disables this already. But if we uninit before 5 vsyncs are
rendered, this can get left in a dangling 'enabled' state, which leaks a
debug report callback.

Always explicitly disable it just to be on the safe side.
This commit is contained in:
Niklas Haas 2020-04-15 07:21:36 +02:00
parent d669c67149
commit 7e52e72746
1 changed files with 4 additions and 0 deletions

View File

@ -135,6 +135,10 @@ void ra_gl_ctx_uninit(struct ra_ctx *ctx)
ctx->swapchain = NULL;
}
// Clean up any potentially left-over debug callback
if (ctx->ra)
ra_gl_set_debug(ctx->ra, false);
ra_free(&ctx->ra);
}