diff --git a/data/glest_game b/data/glest_game index c256b6919..a1e6be218 160000 --- a/data/glest_game +++ b/data/glest_game @@ -1 +1 @@ -Subproject commit c256b69196d8aae7f00b833e75d6acdcb73953b0 +Subproject commit a1e6be21823b1c597129e3c81f4301177c32fba7 diff --git a/source/g3d_viewer/main.cpp b/source/g3d_viewer/main.cpp index 66f786938..281f97e31 100644 --- a/source/g3d_viewer/main.cpp +++ b/source/g3d_viewer/main.cpp @@ -307,7 +307,7 @@ MainWindow::MainWindow( std::pair > unitToLoad, #if wxCHECK_VERSION(2, 9, 1) #else - glCanvas->SetCurrent(); + if(glCanvas) glCanvas->SetCurrent(); #endif unitPath = unitToLoad; @@ -479,6 +479,13 @@ void MainWindow::setupStartupSettings() { if(glCanvas == NULL) { int args[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_MIN_ALPHA, 8 }; // to prevent flicker glCanvas = new GlCanvas(this, args); + +#if wxCHECK_VERSION(2, 9, 1) + +#else + glCanvas->SetCurrent(); +#endif + } glCanvas->setCurrentGLContext(); //printf("In setupStartupSettings #2\n");