NPE check when removing player from region zones.
This commit is contained in:
@ -269,6 +269,7 @@ import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.model.variables.AccountVariables;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneId;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneRegion;
|
||||
import org.l2jmobius.gameserver.model.zone.ZoneType;
|
||||
import org.l2jmobius.gameserver.model.zone.type.WaterZone;
|
||||
import org.l2jmobius.gameserver.network.Disconnection;
|
||||
@ -10941,8 +10942,12 @@ public class Player extends Playable
|
||||
// Stop all toggles.
|
||||
getEffectList().stopAllToggles();
|
||||
|
||||
// Remove from world regions zones
|
||||
ZoneManager.getInstance().getRegion(this).removeFromZones(this);
|
||||
// Remove from world regions zones.
|
||||
final ZoneRegion region = ZoneManager.getInstance().getRegion(this);
|
||||
if (region != null)
|
||||
{
|
||||
region.removeFromZones(this);
|
||||
}
|
||||
|
||||
// If a Party is in progress, leave it (and festival party)
|
||||
if (isInParty())
|
||||
|
Reference in New Issue
Block a user