null check ecstack

Summary: fix segmentation fault error

Test Plan:
run enlightenment (wl only server) -> run elementary_test -> run terminlogy
-> move cursor to elementary_test -> click on elementary_test

Reviewers: raster, devilhorns, zmike

CC: cedric

Differential Revision: https://phab.enlightenment.org/D770
This commit is contained in:
Gwanglim Lee 2014-04-18 12:51:36 -04:00 committed by Mike Blumenkrantz
parent 4cce0080b8
commit ffcc5e72d9
1 changed files with 2 additions and 2 deletions

View File

@ -1078,7 +1078,7 @@ _e_comp_intercept_stack_helper(E_Comp_Object *cw, Evas_Object *stack, E_Comp_Obj
else
_e_comp_object_layers_add(cw, NULL, NULL, 0);
/* set restack if stacking has changed */
if (cw->ec->new_client || (ecstack->frame != o))
if (cw->ec->new_client || (!ecstack) || (ecstack->frame != o))
evas_object_data_set(cw->smart_obj, "client_restack", (void*)1);
stack_cb(cw->smart_obj, stack);
if (cw->comp->layers[cw->layer].obj)
@ -1086,7 +1086,7 @@ _e_comp_intercept_stack_helper(E_Comp_Object *cw, Evas_Object *stack, E_Comp_Obj
{
CRI("STACKING ERROR!!!");
}
if (cw->ec->new_client || (ecstack->frame != o))
if (cw->ec->new_client || (!ecstack) || (ecstack->frame != o))
evas_object_data_del(cw->smart_obj, "client_restack");
e_comp_shape_queue(cw->comp);
}