summaryrefslogtreecommitdiffstats
path: root/src/core/hle
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-11-29 08:20:23 +0100
committerGitHub <noreply@github.com>2020-11-29 08:20:23 +0100
commit6750b4d3afb2a3bdcd4b1021be3f1367e9170627 (patch)
treee380c6dbc9352674551b19ddee8248c4d9de3209 /src/core/hle
parentMerge pull request #5034 from german77/communicationModeFix (diff)
parenthid: Check if applet_resource exists in InitializeVibrationDevice (diff)
downloadyuzu-6750b4d3afb2a3bdcd4b1021be3f1367e9170627.tar
yuzu-6750b4d3afb2a3bdcd4b1021be3f1367e9170627.tar.gz
yuzu-6750b4d3afb2a3bdcd4b1021be3f1367e9170627.tar.bz2
yuzu-6750b4d3afb2a3bdcd4b1021be3f1367e9170627.tar.lz
yuzu-6750b4d3afb2a3bdcd4b1021be3f1367e9170627.tar.xz
yuzu-6750b4d3afb2a3bdcd4b1021be3f1367e9170627.tar.zst
yuzu-6750b4d3afb2a3bdcd4b1021be3f1367e9170627.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/hid/hid.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp
index a1d307a41..b3c7234e1 100644
--- a/src/core/hle/service/hid/hid.cpp
+++ b/src/core/hle/service/hid/hid.cpp
@@ -157,8 +157,10 @@ private:
IPC::RequestParser rp{ctx};
const auto vibration_device_handle{rp.PopRaw<Controller_NPad::DeviceHandle>()};
- applet_resource->GetController<Controller_NPad>(HidController::NPad)
- .InitializeVibrationDevice(vibration_device_handle);
+ if (applet_resource != nullptr) {
+ applet_resource->GetController<Controller_NPad>(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,