2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

hid.cpp: Fixed crash when updating pad data while null

Fixes #137
This commit is contained in:
archshift 2014-10-13 22:18:03 -07:00
parent e4905143c8
commit 366ae1b351

View file

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