fix(Mobile): Crash while in loading (before globals are available)
This commit is contained in:
parent
7ddca9d877
commit
5024ea4d9d
@ -37,6 +37,12 @@ namespace big
|
|||||||
|
|
||||||
g_mobile_service->refresh_personal_vehicles();
|
g_mobile_service->refresh_personal_vehicles();
|
||||||
if (ImGui::ListBoxHeader("##personal_veh_list", { 400.f, 500.f }))
|
if (ImGui::ListBoxHeader("##personal_veh_list", { 400.f, 500.f }))
|
||||||
|
{
|
||||||
|
if (g_mobile_service->personal_vehicles().empty())
|
||||||
|
{
|
||||||
|
ImGui::Text("No personal vehicle found, are you online?");
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
const auto personal_veh_idx = mobile::util::get_current_personal_vehicle();
|
const auto personal_veh_idx = mobile::util::get_current_personal_vehicle();
|
||||||
for (const auto& it : g_mobile_service->personal_vehicles())
|
for (const auto& it : g_mobile_service->personal_vehicles())
|
||||||
@ -60,6 +66,7 @@ namespace big
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::ListBoxFooter();
|
ImGui::ListBoxFooter();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user