]> git.tdb.fi Git - libs/gl.git/commitdiff
Avoid segfault for trying to refresh a Mesh with no buffers
authorMikko Rasa <tdb@tdb.fi>
Sat, 21 Dec 2013 16:58:31 +0000 (18:58 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 21 Dec 2013 16:58:31 +0000 (18:58 +0200)
source/mesh.cpp

index 316e5a3aa9f72ecbcfb3d09e5c9bc09e3b79dfe0..45b022facc1edb8a673c4ea5e6d59485bff2b209 100644 (file)
@@ -76,6 +76,9 @@ void Mesh::create_buffers()
 
 void Mesh::refresh() const
 {
+       if(!vbuf)
+               return;
+
        vertices.refresh();
        if(dirty)
        {