From c72675a03b6752d1b9c1c512e848612056bcc3c0 Mon Sep 17 00:00:00 2001 From: OV2 Date: Thu, 24 May 2018 16:14:50 +0200 Subject: [PATCH] win32: handle shader loading errors --- win32/COpenGL.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/win32/COpenGL.cpp b/win32/COpenGL.cpp index 40fe13ad..e0b1e6a8 100644 --- a/win32/COpenGL.cpp +++ b/win32/COpenGL.cpp @@ -772,7 +772,9 @@ bool COpenGL::SetShadersGLSL(const TCHAR *glslFileName) if (!glslFileName) return false; - glslShader->load_shader(_tToChar(glslFileName)); + if(!glslShader->load_shader(_tToChar(glslFileName))) { + return false; + } shader_type = OGL_SHADER_GLSL;