aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bunnei <bunneidev@gmail.com>2014-10-27 21:35:01 -0400
committerGravatar bunnei <bunneidev@gmail.com>2014-10-27 21:35:01 -0400
commita110b06fb6cca7c60af1707173686d72430c71fb (patch)
tree6d9ee09521dd15a98f9e4af33d576eb7ba245c6f
parent118d208d2a609b9cfe0505f37a885234821e057b (diff)
parent366ae1b351e7a22fc24e625b516c2d1877543444 (diff)
Merge pull request #141 from archshift/crash-hunt
hid.cpp: Fixed crash when updating pad data while null
-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 b6ec1b8f..ef38a560 100644
--- a/src/core/hle/service/hid.cpp
+++ b/src/core/hle/service/hid.cpp
@@ -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;