CloudWatch/Logs: Fix crash when time column has nil values (#37708)

This commit is contained in:
Andrej Ocenas
2021-08-12 10:36:06 +02:00
committed by GitHub
parent e76848acee
commit b5f7df3e62
2 changed files with 77 additions and 38 deletions
+8
View File
@@ -37,5 +37,13 @@ func (a ByTime) Less(i, j int) bool {
return false
}
if timeField.At(i).(*time.Time) == nil {
return false
}
if timeField.At(j).(*time.Time) == nil {
return true
}
return (timeField.At(i).(*time.Time)).Before(*timeField.At(j).(*time.Time))
}