single browser: avoid segfault when path is NULL

This commit is contained in:
Boris Faure 2016-09-25 17:58:37 +02:00
parent 5890d90f84
commit 3c8afe9562
1 changed files with 7 additions and 2 deletions

View File

@ -1448,11 +1448,16 @@ _animate_cb(void *data)
static Evas_Object *
_viewer_add(Evas_Object *parent, const char *path, Ephoto_Single_Browser *sb)
{
Ephoto_Viewer *v = calloc(1, sizeof(Ephoto_Viewer));
Ephoto_Viewer *v;
int err;
Evas_Coord w, h;
const char *group = _ephoto_get_edje_group(path);
const char *group;
EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
group = _ephoto_get_edje_group(path);
v = calloc(1, sizeof(Ephoto_Viewer));
v->zoom_first = EINA_TRUE;
v->cur_frame = 0;
v->anim_timer = NULL;