forked from mirror/openmw-tes3mp
[Server] Add an extra check to Cell::sendToLoaded to be on the safe side
This commit is contained in:
parent
060e440ab2
commit
4a5b8c927f
1 changed files with 7 additions and 0 deletions
|
@ -39,6 +39,13 @@ Cell::TPlayers Cell::getPlayers() const
|
|||
|
||||
void Cell::sendToLoaded(mwmp::WorldPacket *worldPacket, mwmp::BaseEvent *baseEvent) const
|
||||
{
|
||||
if (players.empty())
|
||||
{
|
||||
// Remove this once we are sure it can't happen
|
||||
LOG_MESSAGE_SIMPLE(Log::LOG_WARN, "- Attempt to send packet to players in Cell::sendToLoaded when there are no players!\n- Please report to a developer");
|
||||
return;
|
||||
}
|
||||
|
||||
std::list <Player*> plList;
|
||||
|
||||
for (auto pl : players)
|
||||
|
|
Loading…
Reference in a new issue