summaryrefslogtreecommitdiff
path: root/src/account.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-15 22:34:10 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-15 22:34:10 -0400
commite8c90ef96f9d461a3d24d7125cddcd47a545ca75 (patch)
tree66c757953de1b1d82b190fea93fb2b1150c21432 /src/account.cc
parent503a96034e623334a3c3708543cf74c3f254aaa1 (diff)
downloadfork-ledger-e8c90ef96f9d461a3d24d7125cddcd47a545ca75.tar.gz
fork-ledger-e8c90ef96f9d461a3d24d7125cddcd47a545ca75.tar.bz2
fork-ledger-e8c90ef96f9d461a3d24d7125cddcd47a545ca75.zip
If an account's "total" is empty, return 0
Diffstat (limited to 'src/account.cc')
-rw-r--r--src/account.cc5
1 files changed, 4 insertions, 1 deletions
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) {