diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-15 22:34:10 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-15 22:34:10 -0400 |
commit | e8c90ef96f9d461a3d24d7125cddcd47a545ca75 (patch) | |
tree | 66c757953de1b1d82b190fea93fb2b1150c21432 /src/account.cc | |
parent | 503a96034e623334a3c3708543cf74c3f254aaa1 (diff) | |
download | fork-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.cc | 5 |
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) { |