diff --git a/db.go b/db.go index a37f687..d15dc74 100644 --- a/db.go +++ b/db.go @@ -577,7 +577,11 @@ type Stats struct { func (s *Stats) Sub(other *Stats) Stats { var diff Stats if s == nil { - return diff + if other == nil { + return diff + } else { + return *other + } } diff = *s if other == nil {