summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/GLUtil.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/VideoBackends/OGL/GLUtil.cpp')
-rw-r--r--Source/Core/VideoBackends/OGL/GLUtil.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/Core/VideoBackends/OGL/GLUtil.cpp b/Source/Core/VideoBackends/OGL/GLUtil.cpp
index f9b3ccb844..d367c370bf 100644
--- a/Source/Core/VideoBackends/OGL/GLUtil.cpp
+++ b/Source/Core/VideoBackends/OGL/GLUtil.cpp
@@ -141,9 +141,12 @@ void OpenGL_BindAttributelessVAO()
void OpenGL_DeleteAttributelessVAO()
{
- glDeleteVertexArrays(1, &attributelessVAO);
- glDeleteBuffers(1, &attributelessVBO);
+ if (attributelessVAO)
+ {
+ glDeleteVertexArrays(1, &attributelessVAO);
+ glDeleteBuffers(1, &attributelessVBO);
- attributelessVAO = 0;
- attributelessVBO = 0;
+ attributelessVAO = 0;
+ attributelessVBO = 0;
+ }
}