fixed a potential NULL pointer deref

SVN revision: 11429
This commit is contained in:
tsauerbeck 2004-08-29 09:40:02 +00:00 committed by tsauerbeck
parent f702251c5d
commit 52a6615758
1 changed files with 21 additions and 11 deletions

View File

@ -1,3 +1,7 @@
/*
* vim:ts=8:sw=3:sts=3:noexpandtab
*/
#include "edje_cc.h"
typedef struct _Part_Lookup Part_Lookup;
@ -685,17 +689,23 @@ data_process_lookups(void)
il = image_lookups->data;
for (l = edje_file->image_dir->entries; l; l = l->next)
{
Edje_Image_Directory_Entry *de;
de = l->data;
if ((de->entry) && (!strcmp(de->entry, il->name)))
{
*(il->dest) = de->id;
break;
}
}
if (!edje_file->image_dir)
l = NULL;
else
{
for (l = edje_file->image_dir->entries; l; l = l->next)
{
Edje_Image_Directory_Entry *de;
de = l->data;
if ((de->entry) && (!strcmp(de->entry, il->name)))
{
*(il->dest) = de->id;
break;
}
}
}
if (!l)
{
fprintf(stderr, "%s: Error. unable find image name %s\n",