* edje: prevent some segv in edje_cc and detect wrong edje file
before compiling them. Patch by Rafael Fonseca <rfonseca@profusion.mobi>. SVN revision: 49999
This commit is contained in:
parent
87b85132dd
commit
ba95606159
|
@ -1586,7 +1586,7 @@ st_styles_style_name(void)
|
||||||
stl->name = parse_str(0);
|
stl->name = parse_str(0);
|
||||||
EINA_LIST_FOREACH(edje_file->styles, l, tstl)
|
EINA_LIST_FOREACH(edje_file->styles, l, tstl)
|
||||||
{
|
{
|
||||||
if ((stl != tstl) && (!strcmp(stl->name, tstl->name)))
|
if (stl->name && tstl->name && (stl != tstl) && (!strcmp(stl->name, tstl->name)))
|
||||||
{
|
{
|
||||||
ERR("%s: Error. parse error %s:%i. There is already a style named \"%s\"",
|
ERR("%s: Error. parse error %s:%i. There is already a style named \"%s\"",
|
||||||
progname, file_in, line - 1, stl->name);
|
progname, file_in, line - 1, stl->name);
|
||||||
|
|
|
@ -644,6 +644,8 @@ compile(void)
|
||||||
int fd;
|
int fd;
|
||||||
off_t size;
|
off_t size;
|
||||||
char *data, *p;
|
char *data, *p;
|
||||||
|
Eina_List *l;
|
||||||
|
Edje_Style *stl;
|
||||||
|
|
||||||
if (!tmp_dir)
|
if (!tmp_dir)
|
||||||
#ifdef HAVE_EVIL
|
#ifdef HAVE_EVIL
|
||||||
|
@ -807,6 +809,13 @@ compile(void)
|
||||||
}
|
}
|
||||||
free(data);
|
free(data);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(edje_file->styles, l, stl)
|
||||||
|
if (!stl->name)
|
||||||
|
{
|
||||||
|
ERR("%s: Error. style must have a name.", progname);
|
||||||
|
exit(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in New Issue