1
0
Fork 0
mirror of https://github.com/PabloMK7/citra.git synced 2025-02-27 13:31:31 +01:00

Qt: Fix intermittent crash on exit ()

* Fix null pointer deref on exit

* Fix from review
This commit is contained in:
Rokkubro 2023-06-17 02:58:00 +10:00 committed by GitHub
parent 238a574645
commit d807cdfe62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -587,7 +587,9 @@ bool GRenderWindow::event(QEvent* event) {
void GRenderWindow::focusOutEvent(QFocusEvent* event) {
QWidget::focusOutEvent(event);
InputCommon::GetKeyboard()->ReleaseAllKeys();
if (auto* keyboard = InputCommon::GetKeyboard(); keyboard) {
keyboard->ReleaseAllKeys();
}
has_focus = false;
}