From 0b4cc6e14c724a48a4f08814261c61b201a693e5 Mon Sep 17 00:00:00 2001 From: german77 Date: Sat, 6 Jan 2024 23:49:52 -0600 Subject: service: hid: Make sure there's an active aruid handle --- src/hid_core/resources/npad/npad.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/hid_core/resources/npad/npad.cpp b/src/hid_core/resources/npad/npad.cpp index e6c035628..97f31d26e 100644 --- a/src/hid_core/resources/npad/npad.cpp +++ b/src/hid_core/resources/npad/npad.cpp @@ -870,6 +870,11 @@ void NPad::InitializeVibrationDevice( const auto aruid = applet_resource_holder.applet_resource->GetActiveAruid(); const auto npad_index = static_cast(vibration_device_handle.npad_id); const auto device_index = static_cast(vibration_device_handle.device_index); + + if (aruid == 0) { + return; + } + InitializeVibrationDeviceAtIndex(aruid, npad_index, device_index); } -- cgit v1.2.3