diff options
author | Hermet Park <chuneon.park@samsung.com> | 2020-06-10 20:30:19 +0900 |
---|---|---|
committer | Hermet Park <chuneon.park@samsung.com> | 2020-06-10 20:31:49 +0900 |
commit | e38c1f8be38121520fb90761b4d768ee74bfc403 (patch) | |
tree | e6f64309e8ce3e7c28a385a19de3745cb19d4c3c /src/lib | |
parent | 817e1460708b451d14a61a76783d05e2c372787c (diff) |
evas stack: ++safe code.
null check to prevent any crashes (just in case)
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/evas/canvas/evas_stack.x | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_stack.x b/src/lib/evas/canvas/evas_stack.x index ddd3dffbcb..ae39b65695 100644 --- a/src/lib/evas/canvas/evas_stack.x +++ b/src/lib/evas/canvas/evas_stack.x | |||
@@ -152,6 +152,8 @@ _efl_canvas_object_efl_gfx_stack_stack_above(Eo *eo_obj, Evas_Object_Protected_D | |||
152 | if (eo_obj == eo_above) return; | 152 | if (eo_obj == eo_above) return; |
153 | if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_STACK_ABOVE, 1, eo_above)) return; | 153 | if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_STACK_ABOVE, 1, eo_above)) return; |
154 | Evas_Object_Protected_Data *above = efl_data_scope_get(eo_above, EFL_CANVAS_OBJECT_CLASS); | 154 | Evas_Object_Protected_Data *above = efl_data_scope_get(eo_above, EFL_CANVAS_OBJECT_CLASS); |
155 | if (!above) return; | ||
156 | |||
155 | if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above)) | 157 | if ((EINA_INLIST_GET(obj))->prev == EINA_INLIST_GET(above)) |
156 | { | 158 | { |
157 | evas_object_inform_call_restack(eo_obj, obj); | 159 | evas_object_inform_call_restack(eo_obj, obj); |
@@ -242,6 +244,8 @@ _efl_canvas_object_efl_gfx_stack_stack_below(Eo *eo_obj, Evas_Object_Protected_D | |||
242 | if (eo_obj == eo_below) return; | 244 | if (eo_obj == eo_below) return; |
243 | if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_STACK_BELOW, 1, eo_below)) return; | 245 | if (_evas_object_intercept_call_evas(obj, EVAS_OBJECT_INTERCEPT_CB_STACK_BELOW, 1, eo_below)) return; |
244 | Evas_Object_Protected_Data *below = efl_data_scope_get(eo_below, EFL_CANVAS_OBJECT_CLASS); | 246 | Evas_Object_Protected_Data *below = efl_data_scope_get(eo_below, EFL_CANVAS_OBJECT_CLASS); |
247 | if (!below) return; | ||
248 | |||
245 | if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below)) | 249 | if ((EINA_INLIST_GET(obj))->next == EINA_INLIST_GET(below)) |
246 | { | 250 | { |
247 | evas_object_inform_call_restack(eo_obj, obj); | 251 | evas_object_inform_call_restack(eo_obj, obj); |