From 568cfa1865559153d539d5e40890d887a6d9e3c7 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 2 Aug 2020 17:16:51 +1000 Subject: [PATCH] GPU/OpenGL: Fix possible error on shutdown --- src/core/gpu_hw_opengl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/gpu_hw_opengl.cpp b/src/core/gpu_hw_opengl.cpp index 152ce2442..02b3ca909 100644 --- a/src/core/gpu_hw_opengl.cpp +++ b/src/core/gpu_hw_opengl.cpp @@ -25,6 +25,10 @@ GPU_HW_OpenGL::~GPU_HW_OpenGL() m_host_display->ClearDisplayTexture(); ResetGraphicsAPIState(); } + + // One of our programs might've been bound. + GL::Program::ResetLastProgram(); + glUseProgram(0); } bool GPU_HW_OpenGL::Initialize(HostDisplay* host_display)