mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
fix(PlayerInfo): Prevent a crash when a player DC's
This commit is contained in:
parent
205a58716e
commit
853d33a534
@ -12,10 +12,10 @@ namespace big
|
||||
|
||||
ImGui::Text("Player ID: %d", g.selected_player.id);
|
||||
|
||||
if (g.selected_player.net_player != nullptr)
|
||||
CPlayerInfo* player_info = g.selected_player.net_player->player_info;
|
||||
if (g.selected_player.net_player != nullptr && player_info != nullptr)
|
||||
{
|
||||
ImGui::Text("Session Host: %s", g.selected_player.net_player->is_host() ? "Yes" : "No");
|
||||
CPlayerInfo* player_info = g.selected_player.net_player->player_info;
|
||||
|
||||
ImGui::Text("Rockstar ID: %d", player_info->m_rockstar_id);
|
||||
ImGui::Text("IP Address: %d.%d.%d.%d:%d", player_info->m_external_ip.m_field1, player_info->m_external_ip.m_field2, player_info->m_external_ip.m_field3, player_info->m_external_ip.m_field4, player_info->m_external_port);
|
||||
|
Loading…
Reference in New Issue
Block a user