From: Mikko Rasa Date: Sat, 21 Dec 2013 16:58:31 +0000 (+0200) Subject: Avoid segfault for trying to refresh a Mesh with no buffers X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=55f24c84b7270e117615b212665f17d64771cede;p=libs%2Fgl.git Avoid segfault for trying to refresh a Mesh with no buffers --- diff --git a/source/mesh.cpp b/source/mesh.cpp index 316e5a3a..45b022fa 100644 --- a/source/mesh.cpp +++ b/source/mesh.cpp @@ -76,6 +76,9 @@ void Mesh::create_buffers() void Mesh::refresh() const { + if(!vbuf) + return; + vertices.refresh(); if(dirty) {