feat(HandlingWindow): Added check for nullptr of local player

This commit is contained in:
Yimura 2021-07-26 21:21:31 +02:00
parent edd45c90e1
commit e4b9b7349a

View File

@ -10,7 +10,7 @@ namespace big
ImGui::SetNextWindowPos({ 50, 50 }, ImGuiCond_FirstUseEver); ImGui::SetNextWindowPos({ 50, 50 }, ImGuiCond_FirstUseEver);
if (g.window.handling && ImGui::Begin("Handling", &g.window.handling)) if (g.window.handling && ImGui::Begin("Handling", &g.window.handling))
{ {
if (g_local_player->m_vehicle == nullptr) if (g_local_player == nullptr || g_local_player->m_vehicle == nullptr)
{ {
ImGui::Text("Please enter a vehicle to modify handling."); ImGui::Text("Please enter a vehicle to modify handling.");