summaryrefslogtreecommitdiff
path: root/src/graphicsvertexes.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-06-13 23:51:20 +0300
committerAndrei Karas <akaras@inbox.ru>2014-06-13 23:51:38 +0300
commit4b8a6d93c5a785c673ec6c9f8a09880c48dee065 (patch)
tree4766d4fb6f25e38070b502cb90b0df70dd1bcee8 /src/graphicsvertexes.cpp
parent487b75ecdf1b6ea327d6a636ce186b393049d21f (diff)
downloadplus-4b8a6d93c5a785c673ec6c9f8a09880c48dee065.tar.gz
plus-4b8a6d93c5a785c673ec6c9f8a09880c48dee065.tar.bz2
plus-4b8a6d93c5a785c673ec6c9f8a09880c48dee065.tar.xz
plus-4b8a6d93c5a785c673ec6c9f8a09880c48dee065.zip
Fix crash with software renderer.
Diffstat (limited to 'src/graphicsvertexes.cpp')
-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)