浏览代码

WGI: Fix a couple of reference leaks

Cameron Gutman 3 年之前
父节点
当前提交
b7c1fbf9f0
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/joystick/windows/SDL_windows_gaming_input.c

+ 3 - 0
src/joystick/windows/SDL_windows_gaming_input.c

@@ -560,9 +560,12 @@ WGI_JoystickInit(void)
                     hr = __FIVectorView_1_Windows__CGaming__CInput__CRawGameController_GetAt(controllers, i, &controller);
                     if (SUCCEEDED(hr) && controller) {
                         IEventHandler_CRawGameControllerVtbl_InvokeAdded(&controller_added, NULL, controller);
+                        __x_ABI_CWindows_CGaming_CInput_CIRawGameController_Release(controller);
                     }
                 }
             }
+
+            __FIVectorView_1_Windows__CGaming__CInput__CRawGameController_Release(controllers);
         }
     }