NPE check when removing player from region zones.
This commit is contained in:
@@ -11183,7 +11183,7 @@ public class Player extends Playable
|
||||
// Stop all toggles.
|
||||
getEffectList().stopAllToggles();
|
||||
|
||||
// Remove from world regions zones
|
||||
// Remove from world regions zones.
|
||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||
if (region != null)
|
||||
{
|
||||
|
@@ -21,8 +21,6 @@ import java.util.logging.Logger;
|
||||
import org.l2jmobius.commons.threads.ThreadPool;
|
||||
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import org.l2jmobius.gameserver.model.events.impl.creature.player.OnPlayerLogout;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
|
||||
@@ -138,7 +136,6 @@ public class Disconnection
|
||||
{
|
||||
if ((_player != null) && _player.isOnline())
|
||||
{
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnPlayerLogout(_player), _player);
|
||||
_player.deleteMe();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user