fix(PlayerInfo): Prevent a crash when a player DC's
This commit is contained in:
parent
f3b18fab72
commit
044ccd0ab6
@ -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);
|
||||
|
Reference in New Issue
Block a user