summaryrefslogtreecommitdiff
path: root/src/lib/ecore
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-04-18 09:42:37 -0700
committerCedric BAIL <cedric.bail@free.fr>2019-04-26 11:32:50 -0700
commiteb8511ce7bc68615fcc837031e66336cbc18dcdd (patch)
tree8681d4e889e5d5ea9252ba4fd35a5b8f4a23f605 /src/lib/ecore
parent8872e4845802633a39faaeed3d9af7d94b8cb96e (diff)
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
Diffstat (limited to 'src/lib/ecore')
-rw-r--r--src/lib/ecore/efl_boolean_model.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/ecore/efl_boolean_model.c b/src/lib/ecore/efl_boolean_model.c
index 20aed0fe50..03e0cee346 100644
--- a/src/lib/ecore/efl_boolean_model.c
+++ b/src/lib/ecore/efl_boolean_model.c
@@ -32,9 +32,13 @@ static Eina_Iterator *
32_efl_boolean_model_efl_model_properties_get(const Eo *obj, 32_efl_boolean_model_efl_model_properties_get(const Eo *obj,
33 Efl_Boolean_Model_Data *pd) 33 Efl_Boolean_Model_Data *pd)
34{ 34{
35 Eina_Iterator *properties = NULL;
36
37 if (pd->parent)
38 properties = eina_hash_iterator_key_new(pd->parent->values);
35 EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(props, 39 EFL_COMPOSITE_MODEL_PROPERTIES_SUPER(props,
36 obj, EFL_BOOLEAN_MODEL_CLASS, 40 obj, EFL_BOOLEAN_MODEL_CLASS,
37 eina_hash_iterator_key_new(pd->parent->values)); 41 properties);
38 return props; 42 return props;
39} 43}
40 44