Evas font: Fixed memory leak when reloading an already-loaded face.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:45:23 +0000 (10:45 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sun, 30 Jan 2011 10:45:23 +0000 (10:45 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@56538 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_font_ot.c

index 9c67673..477a861 100644 (file)
@@ -89,6 +89,8 @@ EAPI void
 evas_common_font_ot_load_face(void *_font)
 {
    RGBA_Font_Source *font = (RGBA_Font_Source *) _font;
+   /* Unload the face if by any chance it's already loaded */
+   evas_common_font_ot_unload_face(font);
    font->hb.face = hb_ft_face_create(font->ft.face, NULL);
 }