evas 3d - fix null access for fopen on 3d mesh save

this fixes CID 1222455 yes fopen for write may fail!
This commit is contained in:
Carsten Haitzler 2014-08-13 20:54:32 +09:00
parent 0d05039f37
commit dad62cc323
1 changed files with 5 additions and 0 deletions

View File

@ -43,6 +43,11 @@ _save_mesh(Evas_3D_Mesh_Data *pd, const char *file, Evas_3D_Mesh_Frame *f)
float *src;
OPEN_FILE(obj)
if (!_obj_file)
{
ERR("File open '%s' for save failed", file);
return;
}
fprintf(_obj_file, "# Evas_3D saver OBJ v0.03 \n");//_obj_file created in macro
/* Adding time comment to .obj file. */
current_time = time(NULL);