evas: check that we don't use a NULL pointer on wrong frame number.

CID 1220083
This commit is contained in:
Cedric BAIL 2014-06-04 01:18:51 +02:00
parent ec28b13c09
commit 21e7a3aed9
1 changed files with 6 additions and 0 deletions

View File

@ -65,6 +65,12 @@ evas_3d_mesh_aabb_add_to_frame(Evas_3D_Mesh_Data *pd, int frame, int stride)
float *minmaxdata = NULL;
Evas_Box3 box3;
if (!curframe)
{
ERR("Invalid frame %i.", frame);
return EINA_FALSE;
}
step = curframe->vertices[EVAS_3D_VERTEX_POSITION].element_count;
size = curframe->vertices[EVAS_3D_VERTEX_POSITION].size;
minmaxdata = (float *)curframe->vertices[EVAS_3D_VERTEX_POSITION].data;