From 290fd545e688639057c7657050335c3bf5729331 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Wed, 10 Dec 2014 23:19:18 -0800 Subject: OGL: Bind the attributeless VAO before EFB copies. Fixes crashes in Zack & Wiki using an older NVIDIA driver. --- Source/Core/VideoBackends/OGL/GLUtil.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/GLUtil.cpp') 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; + } } -- cgit v1.2.3