summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-11-06 16:36:23 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-07 09:57:24 +0900
commit066f2c5cb75b940d8c972d7eeaa8e08287c65b20 (patch)
tree341b54575c7b41d7f76dcb8ec5a299819956e59e
parentf90b88422c63b1c527b7690fd586359556ed1401 (diff)
downloadefl-066f2c5cb75b940d8c972d7eeaa8e08287c65b20.tar.gz
evas: Add some crash prevention checks
This could happen if objects still have references while evas is being shut down (a bad situation).
-rw-r--r--src/lib/evas/canvas/evas_object_main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/evas/canvas/evas_object_main.c b/src/lib/evas/canvas/evas_object_main.c
index 57f8dd7bc7..bb6eee1014 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -1607,6 +1607,7 @@ EAPI void
evas_object_size_hint_display_mode_set(Eo *eo_obj, Evas_Display_Mode dispmode)
{
Evas_Object_Protected_Data *obj = EVAS_OBJECT_DATA_SAFE_GET(eo_obj);
+
EVAS_OBJECT_DATA_ALIVE_CHECK(obj);
evas_object_async_block(obj);
if (EINA_UNLIKELY(!obj->size_hints))
@@ -1634,6 +1635,8 @@ _efl_canvas_object_efl_gfx_size_hint_hint_restricted_min_set(Eo *eo_obj, Evas_Ob
{
if (obj->delete_me)
return;
+
+ EVAS_OBJECT_DATA_VALID_CHECK(obj);
evas_object_async_block(obj);
if (EINA_UNLIKELY(!obj->size_hints))
{
@@ -1674,6 +1677,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_max_set(Eo *eo_obj, Evas_Object_Protec
if (obj->delete_me)
return;
+ EVAS_OBJECT_DATA_VALID_CHECK(obj);
evas_object_async_block(obj);
if (EINA_UNLIKELY(!obj->size_hints))
{
@@ -1737,6 +1741,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_min_set(Eo *eo_obj, Evas_Object_Protec
if (obj->delete_me)
return;
+ EVAS_OBJECT_DATA_VALID_CHECK(obj);
evas_object_async_block(obj);
if (EINA_UNLIKELY(!obj->size_hints))
{
@@ -1772,6 +1777,7 @@ _efl_canvas_object_efl_gfx_size_hint_hint_aspect_set(Eo *eo_obj, Evas_Object_Pro
if (obj->delete_me)
return;
+ EVAS_OBJECT_DATA_VALID_CHECK(obj);
evas_object_async_block(obj);
if (EINA_UNLIKELY(!obj->size_hints))
{
@@ -1805,6 +1811,8 @@ _efl_canvas_object_efl_gfx_size_hint_hint_align_set(Eo *eo_obj, Evas_Object_Prot
{
if (obj->delete_me)
return;
+
+ EVAS_OBJECT_DATA_VALID_CHECK(obj);
evas_object_async_block(obj);
if (!obj->legacy.align_set) obj->legacy.align_set = 1;
if (EINA_UNLIKELY(!obj->size_hints))
@@ -1839,6 +1847,8 @@ _efl_canvas_object_efl_gfx_size_hint_hint_weight_set(Eo *eo_obj, Evas_Object_Pro
{
if (obj->delete_me)
return;
+
+ EVAS_OBJECT_DATA_VALID_CHECK(obj);
evas_object_async_block(obj);
if (!obj->legacy.weight_set) obj->legacy.weight_set = 1;
if (EINA_UNLIKELY(!obj->size_hints))
@@ -1877,6 +1887,8 @@ _efl_canvas_object_efl_gfx_size_hint_hint_margin_set(Eo *eo_obj, Evas_Object_Pro
{
if (obj->delete_me)
return;
+
+ EVAS_OBJECT_DATA_VALID_CHECK(obj);
evas_object_async_block(obj);
if (EINA_UNLIKELY(!obj->size_hints))
{