Fix a nil pointer exception
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
nemunaire 2021-02-10 02:21:15 +01:00
parent 9d069b7f6c
commit 610275ca1d

View File

@ -153,6 +153,7 @@ munits:
func treatFrames(frames chan []byte, client influxdb2.Client) {
first := true
writeAPI := client.WriteAPIBlocking("", "teleinfo/autogen")
fframe:
for {
frame := <-frames
@ -182,6 +183,9 @@ func treatFrames(frames chan []byte, client influxdb2.Client) {
}
if key == "DATE" {
if horodate == nil {
continue fframe
}
defaultHorodate = *horodate
continue
}