Fix infinite loop in addowner checks.

Fixes WORLDGUARD-4138.
This commit is contained in:
wizjany 2019-09-22 14:28:38 -04:00
parent 20db92541b
commit fc0f7acab5

View File

@ -129,8 +129,8 @@ private static Callable<DefaultDomain> checkedAddOwners(Actor sender, RegionMana
}
if (region.getOwners().size() == 0) {
boolean anyOwners = false;
ProtectedRegion parent;
while ((parent = region.getParent()) != null) {
ProtectedRegion parent = region;
while ((parent = parent.getParent()) != null) {
if (parent.getOwners().size() > 0) {
anyOwners = true;
break;