mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 07:48:02 +00:00
fix(Core/WorldSession): prevent crash in SendPacket (#6045)
This commit is contained in:
@@ -200,7 +200,11 @@ ObjectGuid::LowType WorldSession::GetGuidLow() const
|
|||||||
/// Send a packet to the client
|
/// Send a packet to the client
|
||||||
void WorldSession::SendPacket(WorldPacket const* packet)
|
void WorldSession::SendPacket(WorldPacket const* packet)
|
||||||
{
|
{
|
||||||
ASSERT(packet->GetOpcode() != NULL_OPCODE);
|
if (packet->GetOpcode() == NULL_OPCODE)
|
||||||
|
{
|
||||||
|
LOG_ERROR("server", "WorldSession::SendPacket(packet) called, but packet->GetOpcode() was NULL_OPCODE");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!m_Socket)
|
if (!m_Socket)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user