From 5cd3b6f58c64a77c2176e07842f42ad0d6f8749e Mon Sep 17 00:00:00 2001
From: Narr the Reg <juangerman-13@hotmail.com>
Date: Wed, 20 Dec 2023 22:52:36 -0600
Subject: [PATCH] service: hid: Fix crash on InitializeVibrationDevice

---
 src/core/hle/service/hid/hid_server.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/hle/service/hid/hid_server.cpp b/src/core/hle/service/hid/hid_server.cpp
index de24b0401c..06a01c02c6 100644
--- a/src/core/hle/service/hid/hid_server.cpp
+++ b/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);
         }