From c670203a5bf816fba67f0b30a796de090f9293dd Mon Sep 17 00:00:00 2001 From: Vir Chaudhury Date: Sun, 24 Jul 2022 00:37:37 +0800 Subject: [PATCH] add logging for when the OpenGL context fails to initialize --- src/gl/gl_hud.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gl/gl_hud.cpp b/src/gl/gl_hud.cpp index 0de06e97..e1fc3ea3 100644 --- a/src/gl/gl_hud.cpp +++ b/src/gl/gl_hud.cpp @@ -120,7 +120,8 @@ void imgui_create(void *ctx) imgui_init(); inited = true; - gladLoadGL(); + if (!gladLoadGL()) + spdlog::error("Failed to initialize OpenGL context, crash incoming"); GetOpenGLVersion(sw_stats.version_gl.major, sw_stats.version_gl.minor,