mirror of
https://github.com/Ed94/Cog.git
synced 2026-08-05 23:28:46 +00:00
Fix possible crash when GetPlayerInput() is nullptr on startup
This commit is contained in:
@@ -64,6 +64,12 @@ void FCogInputWindow_Actions::RenderContent()
|
|||||||
ImGui::Text("No Enhanced Input Subsystem");
|
ImGui::Text("No Enhanced Input Subsystem");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(EnhancedInputSubsystem->GetPlayerInput() == nullptr)
|
||||||
|
{
|
||||||
|
ImGui::Text("No Player Input");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::BeginMenuBar())
|
if (ImGui::BeginMenuBar())
|
||||||
{
|
{
|
||||||
@@ -233,4 +239,4 @@ void FCogInputWindow_Actions::DrawAxis(const char* Format, const char* ActionNam
|
|||||||
ImGui::SetNextItemWidth(-1);
|
ImGui::SetNextItemWidth(-1);
|
||||||
FCogWindowWidgets::SliderWithReset("##Inject", InjectValue, -1.0f, 1.0f, 0.0f, "%0.2f");
|
FCogWindowWidgets::SliderWithReset("##Inject", InjectValue, -1.0f, 1.0f, 0.0f, "%0.2f");
|
||||||
ImGui::PopID();
|
ImGui::PopID();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user