Преглед изворни кода

service: hid: Ensure resource manager is initialized

Ensures the proper initialization of the IActiveVibrationDeviceList. By using GetResourceManager() instead of resource_manager, we make sure that the IActiveVibrationDeviceListis initialized before it's used, preventing potential null issues.

Fixes #12088
Squall-Leonhart пре 2 година
родитељ
комит
8ae26df15c
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      src/core/hle/service/hid/hid_server.cpp

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

@@ -1563,7 +1563,7 @@ void IHidServer::CreateActiveVibrationDeviceList(HLERequestContext& ctx) {
 
     IPC::ResponseBuilder rb{ctx, 2, 0, 1};
     rb.Push(ResultSuccess);
-    rb.PushIpcInterface<IActiveVibrationDeviceList>(system, resource_manager);
+    rb.PushIpcInterface<IActiveVibrationDeviceList>(system, GetResourceManager());
 }
 
 void IHidServer::PermitVibration(HLERequestContext& ctx) {