add class type check where client layer marker is taken

Summary:
it fixes crash when running wl client apps on e wayland server.
invalid comp object pointer value is returned by using eo_data_scope_get.
thus eo_isa should be added before eo_data_scope_get.

Test Plan:
1. run e wl server
2. run wl client terminlogy
3. run second wl client elementary_test

Reviewers: raster, devilhorns, zmike, stefan_schmidt

CC: cedric

Differential Revision: https://phab.enlightenment.org/D919
This commit is contained in:
Gwanglim Lee 2014-06-02 07:16:41 -04:00 committed by Mike Blumenkrantz
parent 82c8556dad
commit a49cede790
1 changed files with 4 additions and 1 deletions

View File

@ -166,7 +166,10 @@ _e_comp_object_layers_add(E_Comp_Object *cw, E_Comp_Object *above, E_Comp_Object
* will return NULL for fake layers (eg. wayland)
*/
if (cw->comp->layers[cw->layer].obj)
layer_cw = eo_data_scope_get(cw->comp->layers[cw->layer].obj, MY_CLASS);
{
if (eo_isa(cw->comp->layers[cw->layer].obj, MY_CLASS))
layer_cw = eo_data_scope_get(cw->comp->layers[cw->layer].obj, MY_CLASS);
}
if (layer_cw == cw) layer_cw = NULL;
/*
if (above)