Fix potential NPE in FlagValueCalculator.

This commit is contained in:
sk89q 2014-08-22 19:17:46 -07:00
parent 0edb948a40
commit 54237c0038

View File

@ -443,7 +443,9 @@ public <V> V getEffectiveFlag(final ProtectedRegion region, Flag<V> flag, @Nulla
group = flag.getRegionGroupFlag().getDefault();
}
if (subject == null) {
if (group == null) {
use = false;
} else if (subject == null) {
use = group.contains(Association.NON_MEMBER);
} else if (!group.contains(subject.getAssociation(region))) {
use = false;