]> granicus.if.org Git - libass/commitdiff
Check possible NULL dereference
authorGrigori Goronzy <greg@chown.ath.cx>
Sun, 7 Jun 2015 19:42:42 +0000 (21:42 +0200)
committerGrigori Goronzy <greg@chown.ath.cx>
Sun, 7 Jun 2015 19:42:42 +0000 (21:42 +0200)
Reported by clang scan-build static analysis. This cannot happen with
the current code, but the check might make this more robust in case
anything changes.

libass/ass_render.c

index c49dd5c09e01a1c13cd0743b97097d9001072791..c416cb8064ce46291a569640eb4464557033bd31 100644 (file)
@@ -2275,7 +2275,7 @@ static void render_and_combine_glyphs(ASS_Renderer *render_priv,
             }
             last_info = info;
 
-            if (!info->image)
+            if (!info->image || !current_info)
                 continue;
 
             if (current_info->bitmap_count >= current_info->max_bitmap_count) {