forked from enlightenment/efl
evas: fix possible segfault in evas_3d_node_member_add/del.
Summary: @fix Reviewers: Hermet, cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2367 Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
613e6ad934
commit
ee08fa9b1a
|
@ -1124,7 +1124,7 @@ _evas_3d_node_member_add(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member)
|
|||
return;
|
||||
}
|
||||
Evas_3D_Node_Data *pdmember = eo_data_scope_get(member, MY_CLASS);
|
||||
if (pdmember->parent == obj)
|
||||
if (!pdmember || pdmember->parent == obj)
|
||||
return;
|
||||
|
||||
if (pdmember->parent)
|
||||
|
@ -1157,7 +1157,7 @@ EOLIAN static void
|
|||
_evas_3d_node_member_del(Eo *obj, Evas_3D_Node_Data *pd, Evas_3D_Node *member)
|
||||
{
|
||||
Evas_3D_Node_Data *pdmember = eo_data_scope_get(member, MY_CLASS);
|
||||
if (pdmember->parent != obj)
|
||||
if (!pdmember || pdmember->parent != obj)
|
||||
{
|
||||
ERR("Failed to delete a member node (not a member of the given node)");
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue