jpeg pushed a commit to branch efl-1.19.

http://git.enlightenment.org/core/efl.git/commit/?id=85ac304cb07c0fa71cd773fd7dc0f168e7856da9

commit 85ac304cb07c0fa71cd773fd7dc0f168e7856da9
Author: Jean-Philippe Andre <[email protected]>
Date:   Wed May 10 14:55:45 2017 +0900

    evas filters: Fix crash in the test suite
    
    The flag 'async' was set after running the filter, which led to
    an inconsistent handling of the data, and a dangling reference
    to the text object. This fixes make check by setting the async
    flag before running the filter.
    
    This fix is only for 1.19.
    
    Thanks Stefan for the report!
---
 src/lib/evas/canvas/evas_filter_mixin.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/canvas/evas_filter_mixin.c 
b/src/lib/evas/canvas/evas_filter_mixin.c
index b2aeadb..42e58a4 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -315,16 +315,16 @@ evas_filter_object_render(Eo *eo_obj, 
Evas_Object_Protected_Data *obj,
 
         ENFN->context_free(ENDT, drawctx);
 
-        // Add post-run callback and run filter
-        efl_ref(eo_obj);
-        evas_filter_context_post_run_callback_set(filter, _filter_cb, pd);
-        ok = evas_filter_run(filter);
-
         fcow = FCOW_BEGIN(pd);
         fcow->changed = EINA_FALSE;
         fcow->async = do_async;
-        if (!ok) fcow->invalid = EINA_TRUE;
+        fcow->invalid = EINA_FALSE;
         FCOW_END(fcow, pd);
+        efl_ref(eo_obj);
+
+        // Add post-run callback and run filter
+        evas_filter_context_post_run_callback_set(filter, _filter_cb, pd);
+        ok = evas_filter_run(filter);
 
         if (ok)
           {
@@ -334,6 +334,9 @@ evas_filter_object_render(Eo *eo_obj, 
Evas_Object_Protected_Data *obj,
         else
           {
              ERR("Rendering failed.");
+             fcow = FCOW_BEGIN(pd);
+             fcow->invalid = EINA_TRUE;
+             FCOW_END(fcow, pd);
              efl_unref(eo_obj);
              return EINA_FALSE;
           }

-- 


Reply via email to