elm_image: Fix previous image visible issue 83/136383/1
authorjiin.moon <jiin.moon@samsung.com>
Wed, 31 May 2017 10:01:03 +0000 (19:01 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Thu, 29 Jun 2017 08:24:55 +0000 (17:24 +0900)
Summary: Previous image still visible when elm_image_file_set has wrong file path.

Test Plan: self

Reviewers: jpeg, jypark, singh.amitesh

Reviewed By: singh.amitesh

Subscribers: singh.amitesh, minkyu, cedric

Differential Revision: https://phab.enlightenment.org/D4888

Change-Id: If8393e3851ea7cec1673540d7798eba1850cc75d

src/lib/elm_image.c

index 4396d9a1d81ff6f836a141da0b9f1b205a1e4837..174eb9e4c69ab9459d19e63e9e1a48d30128b13c 100644 (file)
@@ -851,6 +851,8 @@ _elm_image_memfile_set(Eo *obj, Elm_Image_Data *sd, const void *img, size_t size
      {
         ERR("Things are going bad for some random " FMT_SIZE_T
             " byte chunk of memory (%p)", size, sd->img);
+
+        _prev_img_del(sd);
         return EINA_FALSE;
      }
 
@@ -977,6 +979,7 @@ _elm_image_smart_internal_file_set(Eo *obj, Elm_Image_Data *sd,
           {
              ERR("NULL image file passed! (%p)", obj);
           }
+        _prev_img_del(sd);
         return EINA_FALSE;
      }