evas: Fix possible crash in evas_model_save_eet.c

Summary: @fix

Reviewers: cedric, raster, Hermet

Reviewed By: Hermet

Subscribers: artem.popov, jpeg

Differential Revision: https://phab.enlightenment.org/D4293
This commit is contained in:
Oleksandr Shcherbina 2016-09-13 15:17:53 +09:00 committed by Hermet Park
parent cb15722768
commit ce1f1c9ebe
1 changed files with 8 additions and 0 deletions

View File

@ -161,6 +161,14 @@ evas_model_save_file_eet(const Evas_Canvas3D_Mesh *mesh,
eet_file = _evas_canvas3d_eet_file_new();
if (!eet_file)
{
free(eet_mesh);
free(eet_header);
eet_shutdown();
return;
}
eet_mesh->materials_count = 1;
eet_header->materials_count = 1;
eet_mesh->frames_count = 1;