Mercurial > gemma
comparison pkg/imports/wg.go @ 3460:50d40ed6e3da
Don't dereference pointers before checking them not to be nil.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 24 May 2019 22:01:32 +0200 |
parents | de02dae6f7a8 |
children | ba0339118d9c |
comparison
equal
deleted
inserted
replaced
3459:de02dae6f7a8 | 3460:50d40ed6e3da |
---|---|
234 } | 234 } |
235 gauges = append(gauges, isrs) | 235 gauges = append(gauges, isrs) |
236 feedback.Info("Processing %s", code) | 236 feedback.Info("Processing %s", code) |
237 | 237 |
238 // We need a valid time range to identify gauge versions in DB | 238 // We need a valid time range to identify gauge versions in DB |
239 if time.Time(*dr.Enddate).Before(time.Time(*dr.Startdate)) { | 239 if dr.Enddate != nil && dr.Startdate != nil && |
240 time.Time(*dr.Enddate).Before(time.Time(*dr.Startdate)) { | |
240 feedback.Warn("End date before start date") | 241 feedback.Warn("End date before start date") |
241 unchanged++ | 242 unchanged++ |
242 continue | 243 continue |
243 } | 244 } |
244 | 245 |