Commit 08b5c5b2 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

freetype: potential divide by zero crash.

(cherry picked from commit cdc8bcd3)
parent 73ec9d3b
......@@ -2939,9 +2939,12 @@ static int GetFontSize( filter_t *p_filter )
else
{
var_Get( p_filter, "freetype-rel-fontsize", &val );
i_size = (int)p_filter->fmt_out.video.i_height / val.i_int;
p_filter->p_sys->i_display_height =
p_filter->fmt_out.video.i_height;
if( val.i_int > 0 )
{
i_size = (int)p_filter->fmt_out.video.i_height / val.i_int;
p_filter->p_sys->i_display_height =
p_filter->fmt_out.video.i_height;
}
}
if( i_size <= 0 )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment