mirror of https://github.com/mpv-player/mpv
client API: allow passing NULL to mpv_opengl_cb_uninit_gl()
In which case it does nothing.
This commit is contained in:
parent
c324bfab59
commit
82855bec50
|
@ -204,6 +204,9 @@ int mpv_opengl_cb_init_gl(struct mpv_opengl_cb_context *ctx, const char *exts,
|
|||
|
||||
int mpv_opengl_cb_uninit_gl(struct mpv_opengl_cb_context *ctx)
|
||||
{
|
||||
if (!ctx)
|
||||
return 0;
|
||||
|
||||
// Bring down the decoder etc., which still might be using the hwdec
|
||||
// context. Setting initialized=false guarantees it can't come back.
|
||||
|
||||
|
|
Loading…
Reference in New Issue