raster pushed a commit to branch master.

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

commit fcef8d8392b8c8d1d7b96baacaf5e7e89fcf6b45
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Wed Dec 7 19:24:44 2016 +0900

    evas - software generic - fix crash when buffer is freed when its the same
    
    evas_render_engine_software_generic_update(0 definitely is wrong where
    it wants to always free the outbuf even if the buffer passed in is the
    same one and thus it ends up being freed and now invalid. fix it
    
    @fix
---
 .../evas/engines/software_generic/Evas_Engine_Software_Generic.h   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 
a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h 
b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
index b716b6b..59537c9 100644
--- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
+++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
@@ -177,8 +177,11 @@ 
evas_render_engine_software_generic_update(Render_Engine_Software_Generic *re,
                                            Outbuf *ob,
                                            int w, int h)
 {
-   if (re->ob) re->outbuf_free(re->ob);
-   re->ob = ob;
+   if ((re->ob) && (re->ob != ob))
+     {
+        re->outbuf_free(re->ob);
+        re->ob = ob;
+     }
 
    evas_common_tilebuf_free(re->tb);
    re->tb = evas_common_tilebuf_new(w, h);

-- 


Reply via email to