summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2014-10-27 21:35:01 -0400
committerGravatar bunnei2014-10-27 21:35:01 -0400
commita110b06fb6cca7c60af1707173686d72430c71fb (patch)
tree6d9ee09521dd15a98f9e4af33d576eb7ba245c6f /src/core
parentMerge pull request #152 from yuriks/doxyfile (diff)
parenthid.cpp: Fixed crash when updating pad data while null (diff)
downloadyuzu-a110b06fb6cca7c60af1707173686d72430c71fb.tar.gz
yuzu-a110b06fb6cca7c60af1707173686d72430c71fb.tar.xz
yuzu-a110b06fb6cca7c60af1707173686d72430c71fb.zip
Merge pull request #141 from archshift/crash-hunt
hid.cpp: Fixed crash when updating pad data while null
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/hid.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/hle/service/hid.cpp b/src/core/hle/service/hid.cpp
index b6ec1b8ff..ef38a5603 100644
--- a/src/core/hle/service/hid.cpp
+++ b/src/core/hle/service/hid.cpp
@@ -78,6 +78,10 @@ void PadButtonRelease(PadState pad_state) {
78void PadUpdateComplete() { 78void PadUpdateComplete() {
79 PadData* pad_data = GetPadData(); 79 PadData* pad_data = GetPadData();
80 80
81 if (pad_data == nullptr) {
82 return;
83 }
84
81 // Update PadData struct 85 // Update PadData struct
82 pad_data->current_state.hex = next_state.hex; 86 pad_data->current_state.hex = next_state.hex;
83 pad_data->index = next_index; 87 pad_data->index = next_index;