size_t length;
Eina_Bool ret = EINA_FALSE;
+ /* stop preloading as it may hit to-be-freed memory */
+ if (sd->preload_status == ELM_IMAGE_PRELOADING)
+ evas_object_image_preload(sd->img, EINA_TRUE);
+
free(sd->remote_data);
length = eina_binbuf_length_get(download);
sd->remote_data = eina_binbuf_string_steal(download);
Eina_Bool ret = EINA_FALSE;
unsigned int i;
+ _async_cancel(sd);
+
+ /* stop preloading as it may hit to-be-freed memory */
+ if (sd->preload_status == ELM_IMAGE_PRELOADING)
+ evas_object_image_preload(sd->img, EINA_TRUE);
+
if (sd->remote) _elm_url_cancel(sd->remote);
sd->remote = NULL;
break;
}
- _async_cancel(sd);
-
if (!sd->async_enable)
ret = _elm_image_smart_internal_file_set(obj, sd, file, NULL, key);
else
{
Eina_Bool ret;
+ _async_cancel(sd);
+
+ /* stop preloading as it may hit to-be-freed memory */
+ if (sd->preload_status == ELM_IMAGE_PRELOADING)
+ evas_object_image_preload(sd->img, EINA_TRUE);
+
if (sd->remote) _elm_url_cancel(sd->remote);
sd->remote = NULL;
- _async_cancel(sd);
-
if (!sd->async_enable)
ret = _elm_image_smart_internal_file_set(obj, sd, eina_file_filename_get(f), f, key);
else