Merge pull request #18 from Skylonxe/patch-1

Fix possible crash when GetPlayerInput() is nullptr on startup
This commit is contained in:
Arnaud Jamin
2023-12-13 09:46:36 -05:00
committed by GitHub
@@ -64,6 +64,12 @@ void FCogInputWindow_Actions::RenderContent()
ImGui::Text("No Enhanced Input Subsystem");
return;
}
if(EnhancedInputSubsystem->GetPlayerInput() == nullptr)
{
ImGui::Text("No Player Input");
return;
}
if (ImGui::BeginMenuBar())
{
@@ -233,4 +239,4 @@ void FCogInputWindow_Actions::DrawAxis(const char* Format, const char* ActionNam
ImGui::SetNextItemWidth(-1);
FCogWindowWidgets::SliderWithReset("##Inject", InjectValue, -1.0f, 1.0f, 0.0f, "%0.2f");
ImGui::PopID();
}
}