From 366ae1b351e7a22fc24e625b516c2d1877543444 Mon Sep 17 00:00:00 2001 From: archshift Date: Mon, 13 Oct 2014 22:18:03 -0700 Subject: hid.cpp: Fixed crash when updating pad data while null Fixes #137 --- src/core/hle/service/hid.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/core/hle/service/hid.cpp') 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) { 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; -- cgit v1.2.3