dave's catch of null strings

SVN revision: 19086
This commit is contained in:
Carsten Haitzler 2005-12-17 09:58:19 +00:00
parent ab419159e9
commit ce35591227
2 changed files with 4 additions and 2 deletions

View File

@ -464,7 +464,7 @@ _edje_part_recalc_single(Edje *ed,
for (l = ed->file->styles; l; l = l->next) for (l = ed->file->styles; l; l = l->next)
{ {
stl = l->data; stl = l->data;
if (!strcmp(stl->name, style)) break; if ((stl->name) && (!strcmp(stl->name, style))) break;
stl = NULL; stl = NULL;
} }

View File

@ -82,7 +82,7 @@ _edje_format_parse(char **s)
char *s1 = NULL, *s2 = NULL; char *s1 = NULL, *s2 = NULL;
p = *s; p = *s;
if (*p == 0) return NULL; if ((!p) || (*p == 0)) return NULL;
for (;;) for (;;)
{ {
if (!s1) if (!s1)
@ -250,6 +250,7 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
for (ll = stl->tags; ll; ll = ll->next) for (ll = stl->tags; ll; ll = ll->next)
{ {
tag = ll->data; tag = ll->data;
if (!tag->key) continue;
len += strlen(tag->key); len += strlen(tag->key);
len += 1; len += 1;
len += 1; len += 1;
@ -273,6 +274,7 @@ _edje_textblock_style_parse_and_fix(Edje_File *edf)
for (ll = stl->tags; ll; ll = ll->next) for (ll = stl->tags; ll; ll = ll->next)
{ {
tag = ll->data; tag = ll->data;
if (!tag->key) continue;
strcat(buf, tag->key); strcat(buf, tag->key);
strcat(buf, "='"); strcat(buf, "='");
ts = _edje_format_reparse(edf, tag->value); ts = _edje_format_reparse(edf, tag->value);