Просмотр исходного кода

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 лет назад
Родитель
Сommit
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) {