mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-11 23:02:46 +00:00
Merge pull request #141 from archshift/crash-hunt
hid.cpp: Fixed crash when updating pad data while null
This commit is contained in:
commit
a110b06fb6
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue