Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Commit

Permalink
Fix segmentation violation: Issue #42
Browse files Browse the repository at this point in the history
Issue #42
  • Loading branch information
yevgenypats committed Apr 26, 2021
1 parent 75174f2 commit f91436e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/cloudwatch_alarms.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ func fetchCloudwatchAlarmMetrics(ctx context.Context, meta schema.ClientMeta, pa
}
func resolveCloudwatchAlarmMetricMetricStatMetricDimensions(ctx context.Context, meta schema.ClientMeta, resource *schema.Resource, c schema.Column) error {
metric := resource.Item.(types.MetricDataQuery)
if metric.MetricStat == nil || metric.MetricStat.Metric == nil {
return nil
}
dimensions := make(map[string]*string)
for _, d := range metric.MetricStat.Metric.Dimensions {
dimensions[*d.Name] = d.Value
Expand Down

0 comments on commit f91436e

Please sign in to comment.