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) {