From 9125400e979693302bf833726948afd207c7dcf2 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Thu, 20 Jul 2017 17:45:53 +0900 Subject: [PATCH] dont touch img2 in vdieo thumbs if they are not there --- src/bin/videothumb.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/bin/videothumb.c b/src/bin/videothumb.c index 600b336..fab434c 100644 --- a/src/bin/videothumb.c +++ b/src/bin/videothumb.c @@ -77,11 +77,14 @@ _thumb_update(Evas_Object *obj) if (!sd) return; snprintf(buf, sizeof(buf), "%u", sd->realpos); - evas_object_image_file_set(sd->o_img2, NULL, NULL); - evas_object_image_file_set(sd->o_img2, sd->realfile, - sd->poster ? NULL : buf); - evas_object_image_preload(sd->o_img2, EINA_FALSE); - evas_object_smart_callback_call(obj, "loaded", NULL); + if (sd->o_img2) + { + evas_object_image_file_set(sd->o_img2, NULL, NULL); + evas_object_image_file_set(sd->o_img2, sd->realfile, + sd->poster ? NULL : buf); + evas_object_image_preload(sd->o_img2, EINA_FALSE); + evas_object_smart_callback_call(obj, "loaded", NULL); + } } static void @@ -357,8 +360,11 @@ _videothumb_eval(Evas_Object *obj, Eina_Bool force) sd->o_img2 = NULL; } _videothumb_image_load(obj); - evas_object_move(sd->o_img2, ox, oy); - evas_object_resize(sd->o_img2, ow, oh); + if (sd->o_img2) + { + evas_object_move(sd->o_img2, ox, oy); + evas_object_resize(sd->o_img2, ow, oh); + } } else { @@ -373,8 +379,11 @@ _videothumb_eval(Evas_Object *obj, Eina_Bool force) sd->o_img2 = NULL; } _videothumb_image_load(obj); - evas_object_move(sd->o_img2, ox, oy); - evas_object_resize(sd->o_img2, ow, oh); + if (sd->o_img2) + { + evas_object_move(sd->o_img2, ox, oy); + evas_object_resize(sd->o_img2, ow, oh); + } } else {