osgviewerQt crashed when press key F
x1244 opened this issue · 1 comments
x1244 commented
When running osgviewerQt, press the key F
, the application crashed. The reason was osgOpenGLWidget::keyPressEvent
don't check the validation of _mainwindow
when invoke _mainwindow->setCentralWidget(this)
. I have fixed it and will make a pull requests.
showNormal();
setMinimumSize(g);
QMainWindow* _mainwindow = dynamic_cast<QMainWindow*>(parent());
if(_mainwindow){
_mainwindow->setCentralWidget(this);
}
if(layout())
layout()->setContentsMargins(sMargins);
qApp->processEvents();
setMinimumSize(QSize(1, 1));
mathieu commented
merged PR