summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/graphicsvertexes.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/graphicsvertexes.cpp b/src/graphicsvertexes.cpp
index 297762146..c632952ee 100644
--- a/src/graphicsvertexes.cpp
+++ b/src/graphicsvertexes.cpp
@@ -97,8 +97,15 @@ void OpenGLGraphicsVertexes::clear()
}
mIntTexPool.clear();
- mglDeleteBuffers(mVbo.size(), &mVbo[0]);
- mVbo.clear();
+ if (mglDeleteBuffers)
+ {
+ const int sz = mVbo.size();
+ if (sz > 0)
+ {
+ mglDeleteBuffers(sz, &mVbo[0]);
+ mVbo.clear();
+ }
+ }
mVp.clear();
if (ptr)