mirror of https://github.com/mpv-player/mpv
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:
parent
d669c67149
commit
7e52e72746
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue