diff --git a/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp b/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp index a149c0990c..377de3bacf 100644 --- a/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp +++ b/stepmania/src/arch/InputHandler/InputHandler_Win32_Pump.cpp @@ -146,6 +146,9 @@ InputHandler_Win32_Pump::~InputHandler_Win32_Pump() int InputHandler_Win32_Pump::dev_t::GetPadEvent() { + if(h == INVALID_HANDLE_VALUE) + return -1; + int ret; if(!pending) @@ -173,7 +176,9 @@ int InputHandler_Win32_Pump::dev_t::GetPadEvent() if(ret == 0) { // this prints too much info in Win98 -// LOG->Warn(werr_ssprintf(GetLastError(), "Error reading Pump pad")); + // See if it's fixed--h should be INVALID_HANDLE_VALUE if + // the pad isn't there. -glenn + LOG->Warn(werr_ssprintf(GetLastError(), "Error reading Pump pad")); return -1; }