From fd424585f21ca665f438281841d9d9f9ce83001d Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Wed, 26 Jul 2006 00:31:48 +0000 Subject: [PATCH] Fix assert with monkey keyboard. --- .../src/arch/InputHandler/InputHandler_MonkeyKeyboard.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/stepmania/src/arch/InputHandler/InputHandler_MonkeyKeyboard.cpp b/stepmania/src/arch/InputHandler/InputHandler_MonkeyKeyboard.cpp index 352eaaa6d5..4a3011366a 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_MonkeyKeyboard.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_MonkeyKeyboard.cpp @@ -73,8 +73,11 @@ void InputHandler_MonkeyKeyboard::Update() if( fSecsAgo > 0.5 ) { - // End the previous key - ButtonPressed( m_diLast, false ); + if( m_diLast.IsValid() ) + { + // End the previous key + ButtonPressed( m_diLast, false ); + } // Choose a new key and send it. m_diLast = DeviceInput( DEVICE_KEYBOARD, GetRandomKeyboardKey() );