hermet pushed a commit to branch master.

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

commit 5f654404d01509e684c1a1998ed8bd25dd67dae9
Author: Taehyub Kim <taehyub....@samsung.com>
Date:   Fri May 15 18:09:51 2020 +0900

    evas_vg_shape: return NULL in evas_vg_shape_add when the parent of shape is 
NULL
    
    Summary:
    evas_vg_shaep_add should returned NULL when the parent is NULL
    because the function does not allow the NULL parent.
    @fix
    
    Reviewers: jsuya, Hermet
    
    Reviewed By: Hermet
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D11839
---
 src/lib/evas/canvas/efl_canvas_vg_shape.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/efl_canvas_vg_shape.c 
b/src/lib/evas/canvas/efl_canvas_vg_shape.c
index fb886d55df..9186c18220 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_shape.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_shape.c
@@ -474,7 +474,12 @@ evas_vg_shape_add(Efl_Canvas_Vg_Node *parent)
 {
    /* Warn it because the usage has been changed.
       We can remove this message after v1.21. */
-   if (!parent) CRI("Efl_Canvas_Vg_Shape only allow Efl_Canvas_Vg_Node as the 
parent");
+   if (!parent)
+     {
+        ERR("Efl_Canvas_Vg_Shape only allow Efl_Canvas_Vg_Node as the parent");
+        return NULL;
+     }
+
    return efl_add(MY_CLASS, parent);
 }
 

-- 


Reply via email to