ecore: protect efl_model_properties_get from accesing NULL pointer when Model parent is not a Efl.BooleanModel.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D8659
This commit is contained in:
Cedric BAIL 2019-04-18 09:42:37 -07:00
parent 8872e48458
commit eb8511ce7b
1 changed files with 5 additions and 1 deletions

View File

@ -32,9 +32,13 @@ static Eina_Iterator *
_efl_boolean_model_efl_model_properties_get(const Eo *obj,
Efl_Boolean_Model_Data *pd)
{
Eina_Iterator *properties = NULL;
if (pd->parent)
properties = eina_hash_iterator_key_new(pd->parent->values);
EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(props,
obj, EFL_BOOLEAN_MODEL_CLASS,
eina_hash_iterator_key_new(pd->parent->values));
properties);
return props;
}