summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/reconcile.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/reconcile.cc b/src/reconcile.cc
index 0294d93e..9b965ac4 100644
--- a/src/reconcile.cc
+++ b/src/reconcile.cc
@@ -44,8 +44,10 @@ static bool search_for_balance(amount_t& amount,
*prev = next;
amount -= next->amount;
- if (! amount ||
- search_for_balance(amount, xact_next_ptr(next), xact_next(next)))
+ if (! amount) {
+ transaction_xdata(*next).ptr = NULL;
+ return true;
+ } else if (search_for_balance(amount, xact_next_ptr(next), xact_next(next)))
return true;
amount += next->amount;