evas: eo_data_scope_get will return random value in memory, need to always use eo_isa.

This commit is contained in:
Cedric BAIL 2015-04-03 16:30:54 +02:00
parent 6a90d24aab
commit 0a27241f61
2 changed files with 8 additions and 6 deletions

View File

@ -130,7 +130,7 @@ _evas_vg_render(Evas_Object_Protected_Data *obj,
{
Evas_VG_Container_Data *vd = eo_data_scope_get(n, EVAS_VG_CONTAINER_CLASS);
if (vd)
if (eo_isa(n, EVAS_VG_CONTAINER_CLASS))
{
Evas_VG_Node *child;
Eina_List *l;
@ -142,7 +142,9 @@ _evas_vg_render(Evas_Object_Protected_Data *obj,
}
else
{
Evas_VG_Node_Data *nd = eo_data_scope_get(n, EVAS_VG_NODE_CLASS);
Evas_VG_Node_Data *nd;
nd = eo_data_scope_get(n, EVAS_VG_NODE_CLASS);
obj->layer->evas->engine.func->ector_renderer_draw(output, context, surface, nd->renderer, clips, x, y, do_async);
}

View File

@ -279,8 +279,8 @@ _evas_vg_node_efl_gfx_stack_raise(Eo *obj, Evas_VG_Node_Data *pd EINA_UNUSED)
Eo *parent;
eo_do(obj, parent = eo_parent_get());
if (!eo_isa(parent, EVAS_VG_CONTAINER_CLASS)) goto on_error;
cd = eo_data_scope_get(parent, EVAS_VG_CONTAINER_CLASS);
if (!cd) goto on_error;
// FIXME: this could become slow with to much object
lookup = eina_list_data_find_list(cd->children, obj);
@ -309,8 +309,8 @@ _evas_vg_node_efl_gfx_stack_stack_above(Eo *obj,
Eo *parent;
eo_do(obj, parent = eo_parent_get());
if (!eo_isa(parent, EVAS_VG_CONTAINER_CLASS)) goto on_error;
cd = eo_data_scope_get(parent, EVAS_VG_CONTAINER_CLASS);
if (!cd) goto on_error;
// FIXME: this could become slow with to much object
lookup = eina_list_data_find_list(cd->children, obj);
@ -339,8 +339,8 @@ _evas_vg_node_efl_gfx_stack_stack_below(Eo *obj,
Eo *parent;
eo_do(obj, parent = eo_parent_get());
if (!eo_isa(parent, EVAS_VG_CONTAINER_CLASS)) goto on_error;
cd = eo_data_scope_get(parent, EVAS_VG_CONTAINER_CLASS);
if (!cd) goto on_error;
// FIXME: this could become slow with to much object
lookup = eina_list_data_find_list(cd->children, obj);
@ -367,8 +367,8 @@ _evas_vg_node_efl_gfx_stack_lower(Eo *obj, Evas_VG_Node_Data *pd EINA_UNUSED)
Eo *parent;
eo_do(obj, parent = eo_parent_get());
if (!eo_isa(parent, EVAS_VG_CONTAINER_CLASS)) goto on_error;
cd = eo_data_scope_get(parent, EVAS_VG_CONTAINER_CLASS);
if (!cd) goto on_error;
// FIXME: this could become slow with to much object
lookup = eina_list_data_find_list(cd->children, obj);