summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-19 15:46:57 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-19 15:46:57 -0400
commitbef9fdc471e613ef4810ad1305c226334218fedd (patch)
tree11982993874e47d64eeed7eca075bcf7540c169d
parentf9607a57c19101b72bbd7ba4af9cc074fd374bad (diff)
downloadfork-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.cc5
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) {