[vlc-devel] [PATCH] nvdec: fix segfault in nvdec_gl

quentin.chateau at deepskycorp.com quentin.chateau at deepskycorp.com
Fri Apr 3 17:44:05 CEST 2020


From: Quentin Chateau <quentin.chateau at deepskycorp.com>

---
 modules/hw/nvdec/nvdec_gl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/hw/nvdec/nvdec_gl.c b/modules/hw/nvdec/nvdec_gl.c
index 137e730028..18a34d061c 100644
--- a/modules/hw/nvdec/nvdec_gl.c
+++ b/modules/hw/nvdec/nvdec_gl.c
@@ -150,7 +150,8 @@ static void Close(vlc_object_t *obj)
 {
     struct vlc_gl_interop *interop = (void *)obj;
     converter_sys_t *p_sys = interop->priv;
-    vlc_decoder_device_Release(p_sys->device);
+    if (p_sys)
+        vlc_decoder_device_Release(p_sys->device);
 }
 
 static int Open(vlc_object_t *obj)
-- 
2.17.1



More information about the vlc-devel mailing list