mirror of https://github.com/mpv-player/mpv
vaapi: add missing NULL check
ctx->destroy_native_ctx is guarded, but this early exit was not.
This commit is contained in:
parent
6898d57d98
commit
02aa4f5e28
|
@ -316,7 +316,8 @@ static struct AVBufferRef *va_create_standalone(struct mpv_global *global,
|
||||||
va_initialize(display, log, params->probing);
|
va_initialize(display, log, params->probing);
|
||||||
if (!ctx) {
|
if (!ctx) {
|
||||||
vaTerminate(display);
|
vaTerminate(display);
|
||||||
native_displays[n]->destroy(native_ctx);
|
if (native_displays[n]->destroy)
|
||||||
|
native_displays[n]->destroy(native_ctx);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
ctx->native_ctx = native_ctx;
|
ctx->native_ctx = native_ctx;
|
||||||
|
|
Loading…
Reference in New Issue