summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/decode/dxva2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/decode/dxva2.c b/video/decode/dxva2.c
index e03014438a..f2a70f099d 100644
--- a/video/decode/dxva2.c
+++ b/video/decode/dxva2.c
@@ -157,6 +157,8 @@ static void dxva2_destroy_decoder(struct lavc_ctx *s)
static void dxva2_uninit(struct lavc_ctx *s)
{
DXVA2Context *ctx = s->hwdec_priv;
+ if (!ctx)
+ return;
if (ctx->decoder)
dxva2_destroy_decoder(s);