From 539a4b1013d398f3712ba7949b41750457302cdd Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Mon, 18 May 2009 21:38:20 +0000 Subject: [PATCH] Fixed frame_set(). No frame structure is created anymore when NULL is passed as argument. SVN revision: 40732 --- legacy/ethumb/src/lib/Ethumb.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/legacy/ethumb/src/lib/Ethumb.c b/legacy/ethumb/src/lib/Ethumb.c index 331d20c3f3..cd60ac04e4 100644 --- a/legacy/ethumb/src/lib/Ethumb.c +++ b/legacy/ethumb/src/lib/Ethumb.c @@ -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)