ソースを参照

Fixed crash if OpenGL version or extensions are not satisfied.

Lasse Öörni 13 年 前
コミット
1ab5dd3e8d
1 ファイル変更2 行追加0 行削除
  1. 2 0
      Engine/Graphics/OpenGL/OGLGraphics.cpp

+ 2 - 0
Engine/Graphics/OpenGL/OGLGraphics.cpp

@@ -245,6 +245,7 @@ bool Graphics::SetMode(int width, int height, bool fullscreen, bool vsync, bool
         {
         {
             LOGERROR("OpenGL 2.0 is required");
             LOGERROR("OpenGL 2.0 is required");
             glfwCloseWindow(impl_->window_);
             glfwCloseWindow(impl_->window_);
+            impl_->window_ = 0;
             return false;
             return false;
         }
         }
         
         
@@ -254,6 +255,7 @@ bool Graphics::SetMode(int width, int height, bool fullscreen, bool vsync, bool
             LOGERROR("EXT_framebuffer_object, EXT_packed_depth_stencil, EXT_texture_compression_s3tc and "
             LOGERROR("EXT_framebuffer_object, EXT_packed_depth_stencil, EXT_texture_compression_s3tc and "
                 "EXT_texture_filter_anisotropic OpenGL extensions are required");
                 "EXT_texture_filter_anisotropic OpenGL extensions are required");
             glfwCloseWindow(impl_->window_);
             glfwCloseWindow(impl_->window_);
+            impl_->window_ = 0;
             return false;
             return false;
         }
         }