From f2012e5aff21e1ba0d06bfab868191d221e8f7ed Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Thu, 25 Jan 2024 23:46:00 -0600 Subject: service: hid: Don't try to vibrate if device isn't initialized --- src/hid_core/resource_manager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/hid_core/resource_manager.cpp') diff --git a/src/hid_core/resource_manager.cpp b/src/hid_core/resource_manager.cpp index ca824b4a3..8ef0df020 100644 --- a/src/hid_core/resource_manager.cpp +++ b/src/hid_core/resource_manager.cpp @@ -373,6 +373,10 @@ Result ResourceManager::SendVibrationValue(u64 aruid, device = GetNSVibrationDevice(handle); } if (device != nullptr) { + // Prevent sending vibrations to an inactive vibration handle + if (!device->IsActive()) { + return ResultSuccess; + } result = device->SendVibrationValue(value); } return result; -- cgit v1.2.3