diff options
author | Carsten Haitzler <raster@rasterman.com> | 2011-12-31 14:35:05 +0000 |
---|---|---|
committer | Carsten Haitzler <raster@rasterman.com> | 2011-12-31 14:35:05 +0000 |
commit | 0078d30bdc46fccfefba6a8ad47df34aa48648cd (patch) | |
tree | c32aacba5e2940bcfc42ec19f35976b0a2db0bb3 /src/bin/e_layout.c | |
parent | b4e855e5ccee3bfa823731155f24e817a020180b (diff) | |
download | enlightenment-0078d30bdc46fccfefba6a8ad47df34aa48648cd.tar.gz |
segv's waiting to happen wrong api calls on wrong object types - check
to protect.
SVN revision: 66707
Diffstat (limited to 'src/bin/e_layout.c')
-rw-r--r-- | src/bin/e_layout.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bin/e_layout.c b/src/bin/e_layout.c index 687a5eb8c8..d6660758b3 100644 --- a/src/bin/e_layout.c +++ b/src/bin/e_layout.c @@ -58,6 +58,7 @@ e_layout_freeze(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); sd->frozen++; return sd->frozen; @@ -68,6 +69,7 @@ e_layout_thaw(Evas_Object *obj) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0); sd = evas_object_smart_data_get(obj); sd->frozen--; if (sd->frozen <= 0) _e_layout_smart_reconfigure(sd); @@ -79,6 +81,7 @@ e_layout_virtual_size_set(Evas_Object *obj, Evas_Coord w, Evas_Coord h) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (w < 1) w = 1; if (h < 1) h = 1; @@ -94,6 +97,7 @@ e_layout_virtual_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h) { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (w) *w = sd->vw; if (h) *h = sd->vh; @@ -104,6 +108,7 @@ e_layout_coord_canvas_to_virtual(Evas_Object *obj, Evas_Coord cx, Evas_Coord cy, { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (vx) *vx = (cx - sd->x) * ((double)(sd->vw) / sd->w); @@ -115,6 +120,7 @@ e_layout_coord_virtual_to_canvas(Evas_Object *obj, Evas_Coord vx, Evas_Coord vy, { E_Smart_Data *sd; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); if (cx) *cx = vx * ((double)(sd->w) / sd->vw) + sd->x; @@ -127,6 +133,7 @@ e_layout_pack(Evas_Object *obj, Evas_Object *child) E_Smart_Data *sd; E_Layout_Item *li; + if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR(); sd = evas_object_smart_data_get(obj); _e_layout_smart_adopt(sd, child); sd->items = eina_list_append(sd->items, child); |