Skip to content

Commit a0cf98f

Browse files
committed
Fix crash on login to kicked character.
1 parent 9a2f167 commit a0cf98f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/game/Handlers/CharacterHandler.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,10 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder *holder)
454454
pCurrChar->SetSession(this);
455455

456456
// Need to attach packet bcaster to the new socket
457-
pCurrChar->m_broadcaster->ChangeSocket(GetSocket());
457+
if (pCurrChar->m_broadcaster)
458+
pCurrChar->m_broadcaster->ChangeSocket(GetSocket());
459+
else
460+
pCurrChar->CreatePacketBroadcaster();
458461

459462
// If the character had a logout request, then he is articifially stunned (in CMSG_LOGOUT_REQUEST handler). Fix it here.
460463
if (pCurrChar->CanFreeMove())

0 commit comments

Comments
 (0)