Merge pull request #141 from archshift/crash-hunt

hid.cpp: Fixed crash when updating pad data while null
This commit is contained in:
bunnei 2014-10-27 21:35:01 -04:00
commit a110b06fb6
1 changed files with 4 additions and 0 deletions

View File

@ -78,6 +78,10 @@ void PadButtonRelease(PadState pad_state) {
void PadUpdateComplete() {
PadData* pad_data = GetPadData();
if (pad_data == nullptr) {
return;
}
// Update PadData struct
pad_data->current_state.hex = next_state.hex;
pad_data->index = next_index;