diff --git a/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java b/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java index 38991551b..2040f148d 100644 --- a/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java +++ b/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java @@ -213,7 +213,7 @@ public class SceneScriptManager { } for(int entityId : region.getEntities()) { - if(!region.getMetaRegion().contains(getScene().getEntityById(entityId).getPosition())) { + if(getScene().getEntityById(entityId) == null || !region.getMetaRegion().contains(getScene().getEntityById(entityId).getPosition())) { region.removeEntity(entityId); }