From 24aad8239770982b7b516900ce2c69e03fa4755f Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 1 Dec 2015 21:55:07 -0800 Subject: [PATCH] Qt: Fix crash when closing multiplayer windows --- CHANGES | 1 + src/platform/qt/InputController.cpp | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index c4c6a3378..e5d559489 100644 --- a/CHANGES +++ b/CHANGES @@ -24,6 +24,7 @@ Bugfixes: - ARM7: Fix STRT/STRBT - ARM7: Implement undefined STRH/LDRH/LDRSH/LDRSB versions - ARM7: Fix bank switching with LDR[B]T/STR[B]T + - Qt: Fix crash when closing multiplayer windows Misc: - GBA Audio: Implement missing flags on SOUNDCNT_X register diff --git a/src/platform/qt/InputController.cpp b/src/platform/qt/InputController.cpp index 85bf49b1c..023ad7568 100644 --- a/src/platform/qt/InputController.cpp +++ b/src/platform/qt/InputController.cpp @@ -91,8 +91,7 @@ void InputController::setConfiguration(ConfigController* config) { #ifdef BUILD_SDL GBASDLEventsLoadConfig(&s_sdlEvents, config->input()); if (!m_playerAttached) { - GBASDLAttachPlayer(&s_sdlEvents, &m_sdlPlayer); - m_playerAttached = true; + m_playerAttached = GBASDLAttachPlayer(&s_sdlEvents, &m_sdlPlayer); } loadConfiguration(SDL_BINDING_BUTTON); loadProfile(SDL_BINDING_BUTTON, profileForType(SDL_BINDING_BUTTON));