Mercurial > gemma
changeset 4810:76e2c627dc6d
Check for nil pointer before accessing its value.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 29 Oct 2019 17:11:18 +0100 |
parents | b6d8570b8480 |
children | c0fe2ac434bd |
files | pkg/imports/gm.go |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/imports/gm.go Tue Oct 29 16:29:29 2019 +0100 +++ b/pkg/imports/gm.go Tue Oct 29 17:11:18 2019 +0100 @@ -399,7 +399,7 @@ convert(measure.Value_max) // -99999 is used by some gauges to signal an error - if *measure.Value == -99999 { + if measure == nil || *measure.Value == -99999 { badValue++ continue }