- attempt to fix segfault on ubuntu 10.04
This commit is contained in:
parent
6e8601739a
commit
82e31d670b
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue