evas 3d - fix mesh saver lack of check for fopen failure

fix CID 1222456
This commit is contained in:
Carsten Haitzler 2014-09-01 19:32:50 +09:00
parent 0040e00373
commit 637fe65e98
1 changed files with 5 additions and 1 deletions

View File

@ -100,7 +100,11 @@ _save_material(Evas_3D_Mesh_Data *pd EINA_UNUSED, const char *file, Evas_3D_Mesh
Evas_3D_Material_Data *mat = eo_data_scope_get(f->material, EVAS_3D_MATERIAL_CLASS);
OPEN_FILE(mtl)
if (!_mtl_file)
{
ERR("File open '%s' for save failed", file);
return;
}
fprintf(_mtl_file, "# Evas_3D saver OBJ v0.03 \n");//_mtl_file created in macro
fprintf(_mtl_file, "# Material Count: 1 \n\n");
fprintf(_mtl_file, "newmtl Material \n");