zmike pushed a commit to branch efl-1.22.

http://git.enlightenment.org/core/efl.git/commit/?id=b85c0873446d9845dd4cd36ff036ca3b960f1e70

commit b85c0873446d9845dd4cd36ff036ca3b960f1e70
Author: Cedric BAIL <[email protected]>
Date:   Thu Apr 18 09:42:37 2019 -0700

    ecore: protect efl_model_properties_get from accesing NULL pointer when 
Model parent is not a Efl.BooleanModel.
    
    Reviewed-by: Marcel Hollerbach <[email protected]>
    Differential Revision: https://phab.enlightenment.org/D8659
---
 src/lib/ecore/efl_boolean_model.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore/efl_boolean_model.c 
b/src/lib/ecore/efl_boolean_model.c
index da9d3bdf96..d43382d91f 100644
--- a/src/lib/ecore/efl_boolean_model.c
+++ b/src/lib/ecore/efl_boolean_model.c
@@ -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;
 }
 

-- 


Reply via email to