summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-11-07 16:08:30 -0800
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-11-13 21:16:04 +0100
commit560db3957792b0dc5ca90076e88cab09b4cb877b (patch)
treebef5eb32de15e62c0ccf44e4c79ec365102cd291
parent600163320bec71fed5611b51f4d28dcc5808f334 (diff)
ecore: properly handle children destruction in Efl.BooleanModel.
The children removal event is happening on the parent model, so access values directly. T8358 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D10623
-rw-r--r--src/lib/ecore/efl_boolean_model.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ecore/efl_boolean_model.c b/src/lib/ecore/efl_boolean_model.c
index 3eaad88..5ac0dca 100644
--- a/src/lib/ecore/efl_boolean_model.c
+++ b/src/lib/ecore/efl_boolean_model.c
@@ -258,11 +258,11 @@ _child_removed(void *data, const Efl_Event *event)
258 Eina_Iterator *it; 258 Eina_Iterator *it;
259 Eina_Array updated; 259 Eina_Array updated;
260 260
261 if (!pd->parent) return; 261 if (!pd->values) return;
262 262
263 eina_array_step_set(&updated, sizeof (Eina_Array), 8); 263 eina_array_step_set(&updated, sizeof (Eina_Array), 8);
264 264
265 it = eina_hash_iterator_data_new(pd->parent->values); 265 it = eina_hash_iterator_data_new(pd->values);
266 EINA_ITERATOR_FOREACH(it, v) 266 EINA_ITERATOR_FOREACH(it, v)
267 { 267 {
268 Efl_Boolean_Model_Storage_Range *lookup; 268 Efl_Boolean_Model_Storage_Range *lookup;
@@ -276,7 +276,7 @@ _child_removed(void *data, const Efl_Event *event)
276 { 276 {
277 unsigned char lower_mask = (((unsigned char)1) << (ev->index & 0x7)) - 1; 277 unsigned char lower_mask = (((unsigned char)1) << (ev->index & 0x7)) - 1;
278 unsigned char upper_mask = (~(((unsigned char)1) << (ev->index & 0x7))) & (~lower_mask); 278 unsigned char upper_mask = (~(((unsigned char)1) << (ev->index & 0x7))) & (~lower_mask);
279 unsigned char offset = (ev->index - lookup->offset) >> 3; 279 uint16_t offset = (ev->index - lookup->offset) >> 3;
280 uint16_t byte_length = lookup->length >> 3; 280 uint16_t byte_length = lookup->length >> 3;
281 281
282 // Manually shift all the byte in the buffer 282 // Manually shift all the byte in the buffer