elm_image: Fix previous image visible issue 86/136386/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:26:07 +0000 (17:26 +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 508420a1fc271c99bafb7b9686e8c0df9293f367..dacf47f7783e25301e53f062c4a46e4837bbf006 100644 (file)
@@ -844,6 +844,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;
      }
 
@@ -970,6 +972,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;
      }