Qt: Fix intermittent crash on exit (#6612)

* Fix null pointer deref on exit

* Fix from review
This commit is contained in:
Rokkubro
2023-06-16 22:28:00 +05:30
committed by GitHub
parent 238a574645
commit d807cdfe62
+3 -1
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;
}