jaehwan pushed a commit to branch master.

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

commit 8f9eb82991384f4edcbb1cdf13febecf30c382dd
Author: Jaehwan Kim <jae.hwan....@samsung.com>
Date:   Thu Jul 30 11:08:39 2015 +0900

    evas engine: add null point exception.
    
    Sometimes the data parameter can be null.
    It makes a segment fault.
    test: evas_new > add method_output as buffer > evas_free
    
    @fix
---
 src/modules/evas/engines/buffer/evas_engine.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/modules/evas/engines/buffer/evas_engine.c 
b/src/modules/evas/engines/buffer/evas_engine.c
index e12381b..21dff7d 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -169,9 +169,11 @@ eng_output_free(void *data)
 {
    Render_Engine *re;
 
-   re = (Render_Engine *)data;
-   evas_render_engine_software_generic_clean(&re->generic);
-   free(re);
+   if ((re = (Render_Engine *)data))
+     {
+        evas_render_engine_software_generic_clean(&re->generic);
+        free(re);
+     }
 
    evas_common_shutdown();
 }
@@ -181,9 +183,9 @@ eng_canvas_alpha_get(void *data, void *context EINA_UNUSED)
 {
    Render_Engine *re;
 
-   re = (Render_Engine *)data;
-   if (re->generic.ob->priv.back_buf)
-     return re->generic.ob->priv.back_buf->cache_entry.flags.alpha;
+   if ((re = (Render_Engine *)data))
+     if (re->generic.ob->priv.back_buf)
+       return re->generic.ob->priv.back_buf->cache_entry.flags.alpha;
    return EINA_TRUE;
 }
 

-- 


Reply via email to