summaryrefslogtreecommitdiff
path: root/src/xact.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/xact.cc')
-rw-r--r--src/xact.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xact.cc b/src/xact.cc
index bf18d5b3..1994d353 100644
--- a/src/xact.cc
+++ b/src/xact.cc
@@ -173,14 +173,15 @@ bool xact_base_t::finalize()
add_post(null_post);
}
- if (balance.is_balance() &&
+ if (! null_post && balance.is_balance() &&
balance.as_balance().amounts.size() == 2) {
// When an xact involves two different commodities (regardless of how
// many posts there are) determine the conversion ratio by dividing the
// total value of one commodity by the total value of the other. This
// establishes the per-unit cost for this post for both commodities.
- DEBUG("xact.finalize", "there were exactly two commodities");
+ DEBUG("xact.finalize",
+ "there were exactly two commodities, and no null post");
bool saw_cost = false;
post_t * top_post = NULL;