diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2016-10-03 11:54:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-03 11:54:49 +0200 |
commit | 463a42c71e0677560324acb8dca7672b2978badc (patch) | |
tree | 6ed47b3e37930d89beeef9c3e693b7efce5bb123 | |
parent | 14fa87ce92af76c793624ca759cd3627ee1e9d54 (diff) | |
parent | ca3b8deb7860eb54c2b5ef44eb686799a688febc (diff) |
Merge pull request #6606 from zaps166/don-crash-on-unsupported-gl
Don't crach when OpenGL version is unsupported
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index aeb3d9e039..80ccf9be67 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -36,6 +36,7 @@ #include "servers/visual/particle_system_sw.h" #include "gl_context/context_gl.h" #include <string.h> +#include <stdlib.h> #ifdef GLEW_ENABLED #define _GL_HALF_FLOAT_OES 0x140B @@ -10816,11 +10817,11 @@ void RasterizerGLES2::init() { // Check for GL 2.1 compatibility, if not bail out if (!glewIsSupported("GL_VERSION_2_1")) { ERR_PRINT("Your system's graphic drivers seem not to support OpenGL 2.1 / GLES 2.0, sorry :(\n" - "Try a drivers update, buy a new GPU or try software rendering on Linux; Godot will now crash with a segmentation fault."); + "Try a drivers update, buy a new GPU or try software rendering on Linux; Godot is now going to terminate."); OS::get_singleton()->alert("Your system's graphic drivers seem not to support OpenGL 2.1 / GLES 2.0, sorry :(\n" "Godot Engine will self-destruct as soon as you acknowledge this error message.", "Fatal error: Insufficient OpenGL / GLES drivers"); - // TODO: If it's even possible, we should stop the execution without segfault and memory leaks :) + exit(1); } #endif |