From d3f46f948a0bb0c31a3c244d2f2e357773764b31 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sat, 24 Feb 2018 13:06:33 +0100 Subject: [PATCH] Ref T254, joystick windows avoid crash when shutting down Temp.workaround, we do not really understand why it crashes here. --- src/blackinput/win/joystickwindows.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/blackinput/win/joystickwindows.cpp b/src/blackinput/win/joystickwindows.cpp index 899d2138e..e6c8fe596 100644 --- a/src/blackinput/win/joystickwindows.cpp +++ b/src/blackinput/win/joystickwindows.cpp @@ -38,16 +38,17 @@ namespace BlackInput CJoystickWindows::~CJoystickWindows() { - // release device before input if (m_directInputDevice) { - m_directInputDevice->Unacquire(); - m_directInputDevice->Release(); - m_directInputDevice = nullptr; + // currently disabled as it causes crashi + // m_directInputDevice->Release(); + // m_directInputDevice = nullptr; } + if (m_directInput) { - m_directInput->Release(); + //! \todo hack without input device this crashes + if (m_directInputDevice) { m_directInput->Release(); } m_directInput = nullptr; }