Fixed frame_set().

No frame structure is created anymore when NULL is passed as argument.



SVN revision: 40732
This commit is contained in:
Rafael Antognolli 2009-05-18 21:38:20 +00:00
parent 1f644476f9
commit 539a4b1013
1 changed files with 13 additions and 2 deletions

View File

@ -384,8 +384,19 @@ ethumb_frame_set(Ethumb *e, const char *theme_file, const char *group, const cha
frame = e->frame;
if (frame)
edje_object_part_unswallow(frame->edje, e->img);
else
{
edje_object_part_unswallow(frame->edje, e->img);
if (!theme_file)
_ethumb_frame_free(frame);
}
if (!theme_file)
{
e->frame = NULL;
return 1;
}
if (!frame)
{
frame = calloc(1, sizeof(Ethumb_Frame));
if (!frame)