mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-11-09 01:38:20 +00:00
WorldServer: Fix crash from deleting last char (#1254)
Revert "WorldServer: Fix crash from deleting last char" This reverts commit d9adafa1fef0ac88ed2b3b8ca6b97c2421a603e2. Update WorldServer.cpp
This commit is contained in:
parent
1e2d5605eb
commit
cea0b98edf
@ -925,7 +925,7 @@ void HandlePacket(Packet* packet) {
|
||||
//We need to delete the entity first, otherwise the char list could delete it while it exists in the world!
|
||||
if (Game::server->GetZoneID() != 0) {
|
||||
auto user = UserManager::Instance()->GetUser(packet->systemAddress);
|
||||
if (!user) return;
|
||||
if (!user || !user->GetLastUsedChar()) return;
|
||||
Game::entityManager->DestroyEntity(user->GetLastUsedChar()->GetEntity());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user