evas: protect against lacking light.

This commit is contained in:
Cedric Bail 2014-05-01 12:04:42 +02:00
parent 3f46fe2742
commit 36e8daf187
1 changed files with 2 additions and 2 deletions

View File

@ -1012,8 +1012,8 @@ _light_build(E3D_Draw_Data *data,
const Evas_Mat4 *matrix_eye)
{
Evas_3D_Node_Data *pd_light_node = eo_data_scope_get(light, EVAS_3D_NODE_CLASS);
Evas_3D_Light *l = pd_light_node->data.light.light;
Evas_3D_Light_Data *pdl = eo_data_scope_get(l, EVAS_3D_LIGHT_CLASS);
Evas_3D_Light *l = pd_light_node ? pd_light_node->data.light.light : NULL;
Evas_3D_Light_Data *pdl = l ? eo_data_scope_get(l, EVAS_3D_LIGHT_CLASS) : NULL;
Evas_Vec3 pos, dir;
if (pdl == NULL)