From 30f93bcc76b1e4aedb65d0b8d001c199d3d485a6 Mon Sep 17 00:00:00 2001 From: Jason Coene Date: Sat, 22 Mar 2014 20:26:19 -0500 Subject: [PATCH] Fix potential null pointer reference, release 0.1.4 --- Makefile | 2 +- main.go | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c5efba1..51df698 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION=0.1.3 +VERSION=0.1.4 default: fmt run diff --git a/main.go b/main.go index 6d277d6..f652fb3 100644 --- a/main.go +++ b/main.go @@ -19,7 +19,7 @@ import ( "time" ) -const VERSION = "0.1.3" +const VERSION = "0.1.4" type Packet struct { Bucket string @@ -164,8 +164,9 @@ func submit() (err error) { continue } - g = gaugePercentile(k, t, pctf, pct) - m.Gauges = append(m.Gauges, *g) + if g = gaugePercentile(k, t, pctf, pct); g != nil { + m.Gauges = append(m.Gauges, *g) + } } } }