Qt: Fix potential crash if a gamepad causes focus to change
Jeffrey Pfau jeffrey@endrift.com
Tue, 14 Apr 2015 20:46:41 -0700
2 files changed,
5 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -20,6 +20,7 @@ - Qt: Fix window not regaining focus after exiting savestate window
- Qt: Fix regression where video would not record if the game had already started - GBA: Fix rewind boundary conditions - GBA: Add initial I/O register settings for background matrix registers + - Qt: Fix potential crash if a gamepad causes focus to change Misc: - Qt: Show multiplayer numbers in window title
M
src/platform/qt/InputController.cpp
→
src/platform/qt/InputController.cpp
@@ -290,6 +290,10 @@ }
QApplication::sendEvent(QApplication::focusWidget(), event); } + if (!QApplication::focusWidget()) { + return; + } + activeButtons.subtract(oldButtons); oldButtons.subtract(m_activeButtons);