mirror of
https://github.com/glest/glest-source.git
synced 2025-08-28 18:29:48 +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="";
|
statusbarText="";
|
||||||
CreateStatusBar();
|
CreateStatusBar();
|
||||||
|
|
||||||
|
this->Layout();
|
||||||
|
|
||||||
wxInitAllImageHandlers();
|
wxInitAllImageHandlers();
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
|
||||||
@@ -361,7 +363,6 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
|
|||||||
fileDialog->SetPath(ToUnicode(modelPath));
|
fileDialog->SetPath(ToUnicode(modelPath));
|
||||||
}
|
}
|
||||||
|
|
||||||
glCanvas->SetCurrent();
|
|
||||||
glCanvas->SetFocus();
|
glCanvas->SetFocus();
|
||||||
|
|
||||||
timer = new wxTimer(this);
|
timer = new wxTimer(this);
|
||||||
@@ -384,14 +385,6 @@ void MainWindow::init() {
|
|||||||
glCanvas->SetCurrent();
|
glCanvas->SetCurrent();
|
||||||
renderer->init();
|
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;
|
wxCommandEvent event;
|
||||||
onMenuRestart(event);
|
onMenuRestart(event);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user