summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaehyub Kim <taehyub.kim@samsung.com>2020-05-15 18:09:51 +0900
committerHermet Park <chuneon.park@samsung.com>2020-05-15 18:09:51 +0900
commit5f654404d01509e684c1a1998ed8bd25dd67dae9 (patch)
treebd11dbadc794996eb44fe69b81372d78d3381c29
parent4d4db4cf444932addd956cb25c84c93fed018bc8 (diff)
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
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_shape.c7
1 files changed, 6 insertions, 1 deletions
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)
474{ 474{
475 /* Warn it because the usage has been changed. 475 /* Warn it because the usage has been changed.
476 We can remove this message after v1.21. */ 476 We can remove this message after v1.21. */
477 if (!parent) CRI("Efl_Canvas_Vg_Shape only allow Efl_Canvas_Vg_Node as the parent"); 477 if (!parent)
478 {
479 ERR("Efl_Canvas_Vg_Shape only allow Efl_Canvas_Vg_Node as the parent");
480 return NULL;
481 }
482
478 return efl_add(MY_CLASS, parent); 483 return efl_add(MY_CLASS, parent);
479} 484}
480 485