# HG changeset patch # User John Tsiombikas # Date 1386464449 -7200 # Node ID d9c8cd19c6066bb7572e9586bbb346c7e4ae81f0 # Parent 7aea3639c411991eb3c6466112468dd1de11c2d0 fixed the face index loading bug diff -r 7aea3639c411 -r d9c8cd19c606 src/scene.cc --- a/src/scene.cc Sun Dec 08 02:18:37 2013 +0200 +++ b/src/scene.cc Sun Dec 08 03:00:49 2013 +0200 @@ -36,6 +36,7 @@ return false; } if(goat3d_load(goat, fname) == -1) { + goat3d_free(goat); return false; } @@ -111,7 +112,7 @@ } } - if(nfaces && !(idata = goat3d_get_mesh_faces(gmesh))) { + if(nfaces && (idata = goat3d_get_mesh_faces(gmesh))) { mesh->set_index_data(nfaces * 3, (unsigned int*)idata); } return mesh;