diff options
-rw-r--r-- | xbmc/input/InputManager.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xbmc/input/InputManager.cpp b/xbmc/input/InputManager.cpp index 1eaffc25da..3345a3d906 100644 --- a/xbmc/input/InputManager.cpp +++ b/xbmc/input/InputManager.cpp @@ -480,8 +480,13 @@ bool CInputManager::OnEvent(XBMC_Event& newEvent) case XBMC_KEYUP: m_Keyboard.ProcessKeyUp(); if (m_LastKey.GetButtonCode() != KEY_INVALID && !(m_LastKey.GetButtonCode() & CKey::MODIFIER_LONG)) - OnKey(m_LastKey); - m_LastKey.Reset(); + { + CKey key = m_LastKey; + m_LastKey.Reset(); // OnKey is reentrant; need to do this before entering + OnKey(key); + } + else + m_LastKey.Reset(); break; case XBMC_MOUSEBUTTONDOWN: case XBMC_MOUSEBUTTONUP: |