summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrigori Goronzy <greg@blackbox>2011-07-17 18:38:31 +0200
committerGrigori Goronzy <greg@blackbox>2011-07-17 18:38:31 +0200
commit29638467c702fd528327da34cf6d96cf9dbf486a (patch)
tree0bdd6f0b03635b44618ecca73c22ad2005764300
parent0b709a5df697b36a24e4456b24585ec8f0c54b63 (diff)
downloadlibass-29638467c702fd528327da34cf6d96cf9dbf486a.tar.bz2
libass-29638467c702fd528327da34cf6d96cf9dbf486a.tar.xz
Hack: return a valid face index even if no glyph is found
Temporary fix for a crash when a font face doesn't actually contain the glyph that fontconfig reports. Needs a real solution.
-rw-r--r--libass/ass_font.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libass/ass_font.c b/libass/ass_font.c
index 370623d..169de8d 100644
--- a/libass/ass_font.c
+++ b/libass/ass_font.c
@@ -487,6 +487,8 @@ int ass_font_get_index(void *fcpriv, ASS_Font *font, uint32_t symbol,
}
}
#endif
+ // FIXME: make sure we have a valid face_index. this is a HACK.
+ *face_index = FFMAX(*face_index, 0);
*glyph_index = index;
return 1;