Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osgviewerQt crashed when press key F #45

Closed
x1244 opened this issue Apr 5, 2021 · 1 comment
Closed

osgviewerQt crashed when press key F #45

x1244 opened this issue Apr 5, 2021 · 1 comment

Comments

@x1244
Copy link

x1244 commented Apr 5, 2021

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
Copy link
Collaborator

mathieu commented Apr 5, 2021

merged PR

@x1244 x1244 closed this as completed Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants