]> git.sesse.net Git - vlc/commitdiff
OpenGL: remove potential NULL dereference
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 15 Nov 2014 10:42:44 +0000 (12:42 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 15 Nov 2014 10:42:44 +0000 (12:42 +0200)
modules/video_output/opengl.c

index b35c07489a9b207bd1090dcef31320fe04a2ec1c..de4a9364520ab2a68746cef7704fccfcf395d095 100644 (file)
@@ -592,7 +592,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++) {