Fix infinite loop in addowner checks.

Fixes WORLDGUARD-4138.
This commit is contained in:
wizjany 2019-09-22 14:28:38 -04:00
parent b0ebbee3de
commit 4707b7c7f0
1 changed files with 2 additions and 2 deletions

View File

@ -129,8 +129,8 @@ public class MemberCommands extends RegionCommandsBase {
}
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;