- 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="";
|
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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user