summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/GLUtil.cpp
diff options
context:
space:
mode:
authorUnknown W. Brackets <checkins@unknownbrackets.org>2014-12-10 23:19:18 -0800
committerUnknown W. Brackets <checkins@unknownbrackets.org>2014-12-10 23:19:18 -0800
commit290fd545e688639057c7657050335c3bf5729331 (patch)
tree015983167a4c25b61114cd3883af4a45e79d09fe /Source/Core/VideoBackends/OGL/GLUtil.cpp
parent0861cb874460e16691f52bfa6e2f60505e7de39d (diff)
OGL: Bind the attributeless VAO before EFB copies.
Fixes crashes in Zack & Wiki using an older NVIDIA driver.
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;
+ }
}