From e8c90ef96f9d461a3d24d7125cddcd47a545ca75 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 15 Feb 2009 22:34:10 -0400 Subject: If an account's "total" is empty, return 0 --- src/account.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/account.cc') diff --git a/src/account.cc b/src/account.cc index 6331bfb2..23ce2e68 100644 --- a/src/account.cc +++ b/src/account.cc @@ -166,7 +166,10 @@ namespace { value_t get_total(account_t& account) { assert(account.xdata_); - return account.xdata_->total; + if (account.xdata_->total.is_null()) + return 0L; + else + return account.xdata_->total; } value_t get_count(account_t& account) { -- cgit v1.2.3