Explorar o código

service: hid: Fix crash on InitializeVibrationDevice

Narr the Reg %!s(int64=2) %!d(string=hai) anos
pai
achega
5cd3b6f58c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/core/hle/service/hid/hid_server.cpp

+ 1 - 1
src/core/hle/service/hid/hid_server.cpp

@@ -51,7 +51,7 @@ private:
         IPC::RequestParser rp{ctx};
         const auto vibration_device_handle{rp.PopRaw<Core::HID::VibrationDeviceHandle>()};
 
-        if (resource_manager != nullptr) {
+        if (resource_manager != nullptr && resource_manager->GetNpad()) {
             resource_manager->GetNpad()->InitializeVibrationDevice(vibration_device_handle);
         }