From 081137bd4f4fdba599374a43086fe6688ef8c58b Mon Sep 17 00:00:00 2001 From: degasus Date: Sun, 1 Feb 2015 13:51:34 +0100 Subject: [PATCH] VideoBackends: set GLInterface to zero after deleting it This fixes a crash on opening the gfx settings after closing a game. --- Source/Core/VideoBackends/OGL/main.cpp | 1 + Source/Core/VideoBackends/Software/SWmain.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/Source/Core/VideoBackends/OGL/main.cpp b/Source/Core/VideoBackends/OGL/main.cpp index 5cd4f88124..5bea0c239c 100644 --- a/Source/Core/VideoBackends/OGL/main.cpp +++ b/Source/Core/VideoBackends/OGL/main.cpp @@ -226,6 +226,7 @@ void VideoBackend::Shutdown() GLInterface->Shutdown(); delete GLInterface; + GLInterface = nullptr; } void VideoBackend::Video_Cleanup() diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp index 004ae5e2bf..497d26be00 100644 --- a/Source/Core/VideoBackends/Software/SWmain.cpp +++ b/Source/Core/VideoBackends/Software/SWmain.cpp @@ -164,6 +164,7 @@ void VideoSoftware::Shutdown() GLInterface->Shutdown(); delete GLInterface; + GLInterface = nullptr; } void VideoSoftware::Video_Cleanup()