Fixing NP panic

This commit is contained in:
Kris Childress 2016-11-07 23:54:46 -08:00
parent 729598a4ae
commit 95a8c59fbf
1 changed files with 3 additions and 0 deletions

View File

@ -145,6 +145,9 @@ func (e *SecurityGroupRule) matches(rule *ec2.IpPermission) bool {
// TODO: Only if len 1?
match := false
for _, spec := range rule.UserIdGroupPairs {
if *e.SourceGroup == nil {
continue
}
if aws.StringValue(spec.GroupId) == *e.SourceGroup.ID {
match = true
break