[vlc-commits] OpenGL: remove potential NULL dereference

Rémi Denis-Courmont git at videolan.org
Thu Nov 20 19:49:24 CET 2014


vlc/vlc-2.2 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 15 12:42:44 2014 +0200| [f819406d7ac16e41b8303859abb32f5e1b996bad] | committer: Jean-Baptiste Kempf

OpenGL: remove potential NULL dereference

(cherry picked from commit 267d8be5f35b8a33bf5e634ff5087a8ab9788019)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/video_output/opengl.c b/modules/video_output/opengl.c
index 35c4779..3c3cddc 100644
--- a/modules/video_output/opengl.c
+++ b/modules/video_output/opengl.c
@@ -593,7 +593,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
         vgl->tex_type     = GL_UNSIGNED_SHORT;
     }
     vgl->chroma = vlc_fourcc_GetChromaDescription(vgl->fmt.i_chroma);
-    vgl->use_multitexture = vgl->chroma->plane_count > 1;
+    vgl->use_multitexture = vgl->chroma && vgl->chroma->plane_count > 1;
 
     /* Texture size */
     for (unsigned j = 0; j < vgl->chroma->plane_count; j++) {



More information about the vlc-commits mailing list