Skip to content

Commit 4aed434

Browse files
committed
Prevent kart placeholders from null pointer dereferencing when setting karts
Probably, not sure, it is almost certainly the case but I might be mistaken
1 parent 3f217b0 commit 4aed434

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/network/protocols/server_lobby.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1982,6 +1982,8 @@ void ServerLobby::asynchronousUpdate()
19821982
for (unsigned i = 0; i < players.size(); i++)
19831983
{
19841984
std::string current_kart = players[i]->getKartName();
1985+
if (!players[i]->getPeer().get())
1986+
continue;
19851987
if (areKartFiltersIgnoringKarts())
19861988
current_kart = "";
19871989
std::string name = StringUtils::wideToUtf8(players[i]->getName());

0 commit comments

Comments
 (0)