]> git.tdb.fi Git - libs/gl.git/commitdiff
Avoid invalid memory access when destroying Mesh
authorMikko Rasa <tdb@tdb.fi>
Sat, 6 Feb 2021 17:46:31 +0000 (19:46 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 6 Feb 2021 17:46:31 +0000 (19:46 +0200)
source/mesh.cpp

index ae08fd83376f1ca838b44c44f717b5f8b668b937..dba8a9915489aede7906f8a684b9d59e288428b5 100644 (file)
@@ -40,6 +40,7 @@ void Mesh::init(ResourceManager *rm)
 Mesh::~Mesh()
 {
        set_manager(0);
+       batches.clear();
        delete vbuf;
        delete ibuf;
 }