commit 86ff23440f0136adbe749a98c65ff8b6b0a07d5d parent 71f5c24b76e115f0e9f84b6cde35cd3da4123d14 Author: Michael Savage <mikejsavage@gmail.com> Date: Sun Aug 30 21:21:43 +0200 Don't prematurely free the heightmap bitmap! Diffstat:
heightmap.cc | | | 3 | ++- |
diff --git a/heightmap.cc b/heightmap.cc @@ -163,7 +163,6 @@ void Heightmap::load( const std::string & image, const int ox, const int oy, delete normals; delete indices; delete lit; - stbi_image_free( pixels ); // printf( "sent\n" ); } @@ -176,6 +175,8 @@ void Heightmap::unload() { glDeleteBuffers( 1, &ebo ); glDeleteVertexArrays( 1, &vao ); + stbi_image_free( pixels ); + vbo_verts = 0; } }