summaryrefslogtreecommitdiff
path: root/src/account.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/account.cc')
-rw-r--r--src/account.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/account.cc b/src/account.cc
index 6c1f81a0..f613d983 100644
--- a/src/account.cc
+++ b/src/account.cc
@@ -219,8 +219,13 @@ void account_t::calculate_sums()
(*pair.second).calculate_sums();
xdata_t& child_xd((*pair.second).xdata());
- add_or_set_value(xd.total, child_xd.total);
- xd.total_count += child_xd.total_count + child_xd.count;
+ if (! child_xd.total.is_null()) {
+ add_or_set_value(xd.total, child_xd.total);
+ xd.total_count += child_xd.total_count + child_xd.count;
+ } else {
+ assert(child_xd.total_count == 0);
+ assert(child_xd.count == 0);
+ }
}
call_scope_t args(*this);