Skip to content

Commit e7c2e61

Browse files
sapiersapier
sapier
authored and
sapier
committedFeb 2, 2014
Add additional check to avoid broadcasting private messages in error conditions
1 parent 6a3fa9d commit e7c2e61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎src/server.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -4385,6 +4385,10 @@ void Server::notifyPlayer(const char *name, const std::wstring msg, const bool p
43854385
Player *player = m_env->getPlayer(name);
43864386
if(!player)
43874387
return;
4388+
4389+
if (player->peer_id == PEER_ID_INEXISTENT)
4390+
return;
4391+
43884392
if (prepend)
43894393
SendChatMessage(player->peer_id, std::wstring(L"Server -!- ")+msg);
43904394
else

0 commit comments

Comments
 (0)
Please sign in to comment.