From af3950764dbcba29c864eaa2258ae2689e607bae Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Fri, 9 Feb 2018 14:02:52 +0100
Subject: [PATCH] hw:d3d11: attempt to avoid a weird crash

(cherry picked from commit 5234057a724757d5fce0d48a08398d2e94b4b4b0)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
---
 modules/hw/d3d11/d3d11_deinterlace.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/hw/d3d11/d3d11_deinterlace.c b/modules/hw/d3d11/d3d11_deinterlace.c
index 91d26cf912ea..e382d7a55878 100644
--- a/modules/hw/d3d11/d3d11_deinterlace.c
+++ b/modules/hw/d3d11/d3d11_deinterlace.c
@@ -570,7 +570,8 @@ void D3D11CloseDeinterlace(vlc_object_t *obj)
     filter_t *filter = (filter_t *)obj;
     filter_sys_t *sys = filter->p_sys;
 
-    ID3D11VideoProcessorOutputView_Release(sys->processorOutput);
+    if (likely(sys->processorOutput))
+        ID3D11VideoProcessorOutputView_Release(sys->processorOutput);
     ID3D11Texture2D_Release(sys->outTexture);
     ID3D11VideoProcessor_Release(sys->videoProcessor);
     ID3D11VideoProcessorEnumerator_Release(sys->procEnumerator);
-- 
GitLab