goat3dgfx
diff src/scene.cc @ 20:d9c8cd19c606
fixed the face index loading bug
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sun, 08 Dec 2013 03:00:49 +0200 |
parents | 6f82b9b6d6c3 |
children | 0b863938da04 |
line diff
1.1 --- a/src/scene.cc Sun Dec 08 02:18:37 2013 +0200 1.2 +++ b/src/scene.cc Sun Dec 08 03:00:49 2013 +0200 1.3 @@ -36,6 +36,7 @@ 1.4 return false; 1.5 } 1.6 if(goat3d_load(goat, fname) == -1) { 1.7 + goat3d_free(goat); 1.8 return false; 1.9 } 1.10 1.11 @@ -111,7 +112,7 @@ 1.12 } 1.13 } 1.14 1.15 - if(nfaces && !(idata = goat3d_get_mesh_faces(gmesh))) { 1.16 + if(nfaces && (idata = goat3d_get_mesh_faces(gmesh))) { 1.17 mesh->set_index_data(nfaces * 3, (unsigned int*)idata); 1.18 } 1.19 return mesh;