Protects from NPE input.getLocation() is nullable

This commit is contained in:
Dani Estevez 2018-05-03 15:13:56 -04:00 committed by Ignasi Barrera
parent f7b4534132
commit 7c5927038a
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ public class AzureComputeSecurityGroupExtension implements SecurityGroupExtensio
return ImmutableSet.copyOf(filter(securityGroups, new Predicate<SecurityGroup>() {
@Override
public boolean apply(SecurityGroup input) {
return locations.contains(input.getLocation().getId());
return input.getLocation() != null && locations.contains(input.getLocation().getId());
}
}));
}