mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-02-09 05:52:52 +08:00
fix nullPointer error
This commit is contained in:
parent
bb8ae4c443
commit
7ca947b05f
@ -213,7 +213,7 @@ public class SceneScriptManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(int entityId : region.getEntities()) {
|
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);
|
region.removeEntity(entityId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user