edje: Fix potential NULL pointer dereference

It is possible that evas_object_data_get here does not return an Edje,
so check the return value. This fixes a coverity reported issue.

@fix
CID1349866

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
Chris Michael 2016-01-25 07:47:03 -05:00
parent 4d4e6fd4b1
commit 3d9a6e238a
1 changed files with 5 additions and 2 deletions

View File

@ -3505,8 +3505,11 @@ _edje_object_part_swallow(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Evas_
/* the object is already swallowed in the requested part */
if (rpcur == rp) return EINA_TRUE;
sed = evas_object_data_get(obj_swallow, ".edje");
/* The object is already swallowed somewhere, unswallow it first */
edje_object_part_unswallow(sed->obj, obj_swallow);
if (sed)
{
/* The object is already swallowed somewhere, unswallow it first */
edje_object_part_unswallow(sed->obj, obj_swallow);
}
}
if (!rp)