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
This commit is contained in:
Taehyub Kim 2020-05-15 18:09:51 +09:00 committed by Hermet Park
parent 4d4db4cf44
commit 5f654404d0
1 changed files with 6 additions and 1 deletions

View File

@ -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);
}