From 55f24c84b7270e117615b212665f17d64771cede Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 21 Dec 2013 18:58:31 +0200 Subject: [PATCH] Avoid segfault for trying to refresh a Mesh with no buffers --- source/mesh.cpp | 3 +++ 1 file changed, 3 insertions(+) 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) { -- 2.45.2