diff --git a/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java b/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java index 3611935..8aa0f11 100644 --- a/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java +++ b/src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java @@ -318,6 +318,12 @@ public class DatabaseDataStore extends DataStore //find top level claim parent Claim topLevelClaim = this.getClaimAt(childClaim.getLesserBoundaryCorner(), true, null); + if(topLevelClaim == null) + { + claimsToRemove.add(childClaim); + continue; + } + //add this claim to the list of children of the current top level claim childClaim.parent = topLevelClaim; topLevelClaim.children.add(childClaim);