mirror of
https://github.com/glest/glest-source.git
synced 2025-08-27 09:54:26 +02:00
- attempt to fix segfault on ubuntu 10.04
This commit is contained in:
@@ -337,6 +337,8 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
|
||||
statusbarText="";
|
||||
CreateStatusBar();
|
||||
|
||||
this->Layout();
|
||||
|
||||
wxInitAllImageHandlers();
|
||||
#ifdef WIN32
|
||||
|
||||
@@ -361,7 +363,6 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
|
||||
fileDialog->SetPath(ToUnicode(modelPath));
|
||||
}
|
||||
|
||||
glCanvas->SetCurrent();
|
||||
glCanvas->SetFocus();
|
||||
|
||||
timer = new wxTimer(this);
|
||||
@@ -384,14 +385,6 @@ void MainWindow::init() {
|
||||
glCanvas->SetCurrent();
|
||||
renderer->init();
|
||||
|
||||
//assertGl();
|
||||
GLenum error= glGetError();
|
||||
|
||||
if(error != GL_NO_ERROR){
|
||||
const char *errorString= reinterpret_cast<const char*>(gluErrorString(error));
|
||||
throw runtime_error("OpenGL error: "+string(errorString));
|
||||
}
|
||||
|
||||
wxCommandEvent event;
|
||||
onMenuRestart(event);
|
||||
}
|
||||
|
Reference in New Issue
Block a user