evas vg: more strict check for the argument.

a shape node must have vg node as the parent.
This commit is contained in:
Hermet Park 2018-12-28 13:38:36 +09:00
parent d2ec3ce170
commit 5a46f2136a
1 changed files with 3 additions and 3 deletions

View File

@ -454,13 +454,13 @@ evas_vg_shape_equal_commands(Eo *obj, const Eo *with)
return efl_gfx_path_equal_commands(obj, with);
}
EAPI Efl_Canvas_Vg_Node*
EAPI Efl_Canvas_Vg_Shape*
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_VG Shape doesn't allow null parent!");
return efl_add(EFL_CANVAS_VG_SHAPE_CLASS, parent);
if (!parent) CRI("Efl_Canvas_Vg_Shape only allow Efl_Canvas_Vg_Node as the parent");
return efl_add(MY_CLASS, parent);
}
#include "efl_canvas_vg_shape.eo.c"