summaryrefslogtreecommitdiff
path: root/src/balance.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/balance.cc')
-rw-r--r--src/balance.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/balance.cc b/src/balance.cc
index 0a2a3fec..5d8785db 100644
--- a/src/balance.cc
+++ b/src/balance.cc
@@ -273,7 +273,8 @@ balance_t::strip_annotations(const keep_details_t& what_to_keep) const
void balance_t::sorted_amounts(amounts_array& sorted) const
{
foreach (const amounts_map::value_type& pair, amounts)
- sorted.push_back(&pair.second);
+ if (pair.second)
+ sorted.push_back(&pair.second);
std::stable_sort(
sorted.begin(), sorted.end(),
[](const amount_t * left, const amount_t * right) {