From 51810a905a3fc3c2e4c8774ae437d1e513c603cb Mon Sep 17 00:00:00 2001 From: ryanhamshire Date: Tue, 28 Oct 2014 19:28:29 -0700 Subject: [PATCH] Bug fix: Initialization in database data store. --- src/me/ryanhamshire/GriefPrevention/DatabaseDataStore.java | 6 ++++++ 1 file changed, 6 insertions(+) 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);