From 0e59a14c82f8af34b69cdbd5e961f60f4c4689d4 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Tue, 18 May 2021 23:20:20 +1000 Subject: [PATCH] OpenGLHostDisplay: Fix crash when context creation fails --- src/frontend-common/opengl_host_display.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend-common/opengl_host_display.cpp b/src/frontend-common/opengl_host_display.cpp index fcf5d969d..d3123ab6e 100644 --- a/src/frontend-common/opengl_host_display.cpp +++ b/src/frontend-common/opengl_host_display.cpp @@ -381,6 +381,7 @@ bool OpenGLHostDisplay::CreateRenderDevice(const WindowInfo& wi, std::string_vie if (!m_gl_context) { Log_ErrorPrintf("Failed to create any GL context"); + m_gl_context.reset(); return false; }