- attempt to fix segfault on ubuntu 10.04

This commit is contained in:
Mark Vejvoda 2011-01-29 23:12:20 +00:00
parent 6e8601739a
commit 82e31d670b
1 changed files with 2 additions and 9 deletions

View File

@ -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);
}