From 6f70e1b1ff01830ff651aa3e38048e659d61b26e Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 25 Nov 2020 13:33:01 -0500 Subject: hid: Check if applet_resource exists in InitializeVibrationDevice --- src/core/hle/service/hid/hid.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 902516b29..db9f5e701 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -155,8 +155,10 @@ private: IPC::RequestParser rp{ctx}; const auto vibration_device_handle{rp.PopRaw()}; - applet_resource->GetController(HidController::NPad) - .InitializeVibrationDevice(vibration_device_handle); + if (applet_resource != nullptr) { + applet_resource->GetController(HidController::NPad) + .InitializeVibrationDevice(vibration_device_handle); + } LOG_DEBUG(Service_HID, "called, npad_type={}, npad_id={}, device_index={}", vibration_device_handle.npad_type, vibration_device_handle.npad_id, -- cgit v1.2.3