From 219da26886108906fcf5e193abeeb7fc276213fe Mon Sep 17 00:00:00 2001 From: Troy McNitt Date: Thu, 21 Jan 2016 08:52:43 -0800 Subject: [PATCH] fix panic from newGoValue when the notification value is nil --- value.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/value.go b/value.go index d2d978f..625e2bb 100644 --- a/value.go +++ b/value.go @@ -71,7 +71,10 @@ func (v value) String() string { } func newGoValue(cRef *C.Value) *value { - return &value{cRef} + if cRef != nil { + return &value{cRef} + } + return nil } func (v *value) notify(api *api, nt *notification) {