[vlc-commits] vout/opengl: fix NULL dereference if pl_context_create fails

Thomas Guillem git at videolan.org
Mon Nov 13 16:46:17 CET 2017


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Nov 13 16:45:37 2017 +0100| [90e8bf9f790335a5b9b972f3dccde7d6d434f618] | committer: Thomas Guillem

vout/opengl: fix NULL dereference if pl_context_create fails

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=90e8bf9f790335a5b9b972f3dccde7d6d434f618
---

 modules/video_output/opengl/vout_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index ddba24076c..48f684661d 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -566,7 +566,8 @@ opengl_deinit_program(vout_display_opengl_t *vgl, struct prgm *prgm)
 
 #ifdef HAVE_LIBPLACEBO
     FREENULL(tc->uloc.pl_vars);
-    pl_context_destroy(&tc->pl_ctx);
+    if (tc->pl_ctx)
+        pl_context_destroy(&tc->pl_ctx);
 #endif
 }
 



More information about the vlc-commits mailing list