diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-19 15:46:57 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-19 15:46:57 -0400 |
commit | bef9fdc471e613ef4810ad1305c226334218fedd (patch) | |
tree | 11982993874e47d64eeed7eca075bcf7540c169d | |
parent | f9607a57c19101b72bbd7ba4af9cc074fd374bad (diff) | |
download | fork-ledger-bef9fdc471e613ef4810ad1305c226334218fedd.tar.gz fork-ledger-bef9fdc471e613ef4810ad1305c226334218fedd.tar.bz2 fork-ledger-bef9fdc471e613ef4810ad1305c226334218fedd.zip |
If an account's aggregate amount is null, return 0
-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 07c01c7e..741cc2f9 100644 --- a/src/account.cc +++ b/src/account.cc @@ -187,7 +187,10 @@ namespace { value_t get_amount(account_t& account) { assert(account.xdata_); - return account.xdata_->value; + if (account.xdata_->value.is_null()) + return 0L; + else + return account.xdata_->value; } value_t get_depth(account_t& account) { |