forked from enlightenment/efl
evas font loading - fix possible divide by 0 when font size is 0
fix coverity CID 1381446
This commit is contained in:
parent
902938f626
commit
e095562ea1
|
@ -487,7 +487,12 @@ evas_common_font_int_load_complete(RGBA_Font_Int *fi)
|
|||
{
|
||||
if (FT_HAS_COLOR(fi->src->ft.face) &&
|
||||
fi->bitmap_scalable & EFL_TEXT_FONT_BITMAP_SCALABLE_COLOR)
|
||||
{
|
||||
if (fi->real_size > 0)
|
||||
fi->scale_factor = (float)fi->size * 64.0 / (float)fi->real_size;
|
||||
else
|
||||
fi->scale_factor = (float)64.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue