jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=51b097c014c77c36f708d3371a42e2045e003ba2

commit 51b097c014c77c36f708d3371a42e2045e003ba2
Author: Hosang Kim <hosang12....@samsung.com>
Date:   Thu Jul 16 20:07:39 2015 +0900

    evas_image : fix unloads cleanup logic
    
    Summary:
    Now Evas gl preload feature is disabled.
    But if it is turned on, memory crash occurs.
    Because evas_gl_common_texture_upload is not excuted immediately.
    
    Test Plan: EVAS_GL_PRELOAD=1 ELM_ENGINE=gl elementary_test -to "photocam"
    
    Reviewers: raster, cedric, woohyun, seoz, Hermet, singh.amitesh, jpeg
    
    Subscribers: jpeg, cedric
    
    Differential Revision: https://phab.enlightenment.org/D2823
    
    Signed-off-by: Jean-Philippe Andre <jp.an...@samsung.com>
---
 src/lib/evas/common/evas_image_main.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/common/evas_image_main.c 
b/src/lib/evas/common/evas_image_main.c
index 10966fd..ce07dab 100644
--- a/src/lib/evas/common/evas_image_main.c
+++ b/src/lib/evas/common/evas_image_main.c
@@ -392,11 +392,16 @@ EAPI void
 evas_common_rgba_pending_unloads_cleanup(void)
 {
    Image_Entry *ie;
+   Eina_List *l;
+   Eina_List *l_next;
 
-   EINA_LIST_FREE(pending_unloads, ie)
+   EINA_LIST_FOREACH_SAFE(pending_unloads, l, l_next, ie)
      {
-        if ((ie->need_unload) && (!ie->preload))
-          evas_common_rgba_image_unload_real(ie);
+        if ((ie->need_unload) && (!ie->preload) && (!ie->flags.preload_done))
+          {
+             evas_common_rgba_image_unload_real(ie);
+             pending_unloads = eina_list_remove_list(pending_unloads, l);
+          }
      }
 }
 

-- 


Reply via email to