From ed5cac57c7b1aeabf055458a0d1cf995d29fb9ea Mon Sep 17 00:00:00 2001 From: eugeni Date: Tue, 16 Jun 2009 17:58:12 +0000 Subject: [PATCH] Add a missing check for a NULL return value. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29367 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libass/ass_font.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libass/ass_font.c b/libass/ass_font.c index e129021439..73ee1c4a5b 100644 --- a/libass/ass_font.c +++ b/libass/ass_font.c @@ -127,6 +127,8 @@ static int add_face(void* fc_priv, ass_font_t* font, uint32_t ch) path = fontconfig_select(fc_priv, font->desc.family, font->desc.treat_family_as_pattern, font->desc.bold, font->desc.italic, &index, ch); + if (!path) + return -1; mem_idx = find_font(font->library, path); if (mem_idx >= 0) {