efl-wl: return NULL without error when non-extracted parent is found

in  efl_wl_extracted_surface_extracted_parent_get()
This commit is contained in:
Mike Blumenkrantz 2018-01-11 16:24:38 -05:00
parent ebdfc54def
commit d176fbc806
2 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ EAPI Eina_Bool efl_wl_surface_extract(Evas_Object *surface);
EAPI Evas_Object *efl_wl_extracted_surface_object_find(void *surface_resource);
/**
* Get the Evas_Object for an extracted surface's parent
* Get the Evas_Object for an extracted surface's parent, or NULL if the parent is not extracted
*
* @note Passing anything other than a valid, extracted surface guarantees a crash.
*

View File

@ -5628,7 +5628,7 @@ efl_wl_extracted_surface_extracted_parent_get(Evas_Object *surface)
if (cs->parent)
{
EINA_SAFETY_ON_FALSE_RETURN_VAL(!cs->parent->extracted, NULL);
if (!cs->parent->extracted) return NULL;
return cs->parent->obj;
}
return NULL;