Fixed crash if WGI didn't give us the name for a controller

main
Sam Lantinga 2021-08-02 16:40:58 -07:00
parent 4562da622c
commit 022235012c
1 changed files with 3 additions and 0 deletions

View File

@ -206,6 +206,9 @@ static HRESULT STDMETHODCALLTYPE IEventHandler_CRawGameControllerVtbl_InvokeAdde
}
__x_ABI_CWindows_CGaming_CInput_CIRawGameController2_Release(controller2);
}
if (!name) {
name = "";
}
hr = __x_ABI_CWindows_CGaming_CInput_CIRawGameController_QueryInterface(controller, &IID_IGameController, (void **)&gamecontroller);
if (SUCCEEDED(hr)) {