Evas font-engine: abort font load even sooner if name is NULL.

SVN revision: 59343
This commit is contained in:
Tom Hacohen 2011-05-12 08:38:21 +00:00
parent 74d6d2b948
commit 7d1f21946a
1 changed files with 3 additions and 5 deletions

View File

@ -259,8 +259,6 @@ _font_style_name_match(const char *font_name, const char *style_name)
{
char *style_key = NULL;
if (!font_name) return EINA_FALSE;
if (!style_name) return EINA_FALSE;
style_key = strchr(font_name, ':');
if (!style_key) return EINA_FALSE;
if (strlen(style_key) > 2) style_key++;
@ -314,14 +312,14 @@ evas_font_load(Evas *evas, const char *name, const char *source, int size)
char *nm;
Font_Rend_Flags wanted_rend = 0;
if (!name) return NULL;
if (name[0] == 0) return NULL;
if (_font_style_name_match(name, "Italic"))
wanted_rend |= FONT_REND_ITALIC;
if (_font_style_name_match(name, "Bold"))
wanted_rend |= FONT_REND_BOLD;
if (!name) return NULL;
if (name[0] == 0) return NULL;
evas_font_init();
EINA_LIST_FOREACH(fonts_cache, l, fd)