forked from enlightenment/efl
Avoiding access in NULL hash and little fixes.
If there isn't a font, the hash is NULL. So, just check before to avoid problems. Moreover, removing one line that had been lost in code generate of fonts parts and moving it declaration for the right context By: Fabiano Fidencio <fidencio@profusion.mobi> SVN revision: 51786
This commit is contained in:
parent
1915b760ee
commit
88f1723ccb
|
@ -6051,7 +6051,6 @@ _edje_generate_source(Evas_Object *obj)
|
||||||
Eina_Strbuf *buf;
|
Eina_Strbuf *buf;
|
||||||
|
|
||||||
Eina_List *l, *ll;
|
Eina_List *l, *ll;
|
||||||
Eina_Iterator *it;
|
|
||||||
Edje_Font_Directory_Entry *fnt;
|
Edje_Font_Directory_Entry *fnt;
|
||||||
|
|
||||||
char *entry;
|
char *entry;
|
||||||
|
@ -6101,23 +6100,28 @@ _edje_generate_source(Evas_Object *obj)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fonts */
|
/* Fonts */
|
||||||
it = eina_hash_iterator_data_new(ed->file->fonts);
|
if (ed->file->fonts)
|
||||||
if (it)
|
|
||||||
{
|
{
|
||||||
BUF_APPEND(I0"fonts {\n");
|
Eina_Iterator *it;
|
||||||
|
|
||||||
EINA_ITERATOR_FOREACH(it, fnt)
|
it = eina_hash_iterator_data_new(ed->file->fonts);
|
||||||
BUF_APPENDF(I1"font: \"%s\" \"%s\";\n", fnt->file,
|
if (it)
|
||||||
fnt->entry);
|
|
||||||
|
|
||||||
BUF_APPEND(I0"}\n\n");
|
|
||||||
eina_list_free(ll);
|
|
||||||
|
|
||||||
if (!ret)
|
|
||||||
{
|
{
|
||||||
ERR("Generating EDC for Fonts");
|
BUF_APPEND(I0"fonts {\n");
|
||||||
eina_strbuf_free(buf);
|
|
||||||
return NULL;
|
EINA_ITERATOR_FOREACH(it, fnt)
|
||||||
|
BUF_APPENDF(I1"font: \"%s\" \"%s\";\n", fnt->file,
|
||||||
|
fnt->entry);
|
||||||
|
|
||||||
|
BUF_APPEND(I0"}\n\n");
|
||||||
|
eina_iterator_free(it);
|
||||||
|
|
||||||
|
if (!ret)
|
||||||
|
{
|
||||||
|
ERR("Generating EDC for Fonts");
|
||||||
|
eina_strbuf_free(buf);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue