Commit 7ca947b0 authored by akatatsu27's avatar akatatsu27
Browse files

fix nullPointer error

parent bb8ae4c4
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment