summaryrefslogtreecommitdiff
path: root/src/draft.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-11 14:45:14 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-11 14:45:14 -0500
commita034435c4287aba7fd32ed63a745e560350c924a (patch)
treef0acb080410a32c215c2c1938811cc14d512b580 /src/draft.cc
parent5ffa987daf4d97c52066e4c28733d826d3726297 (diff)
parentf0f1b0cdfa3a0a73695eda52b25de71bd40adc5a (diff)
downloadfork-ledger-a034435c4287aba7fd32ed63a745e560350c924a.tar.gz
fork-ledger-a034435c4287aba7fd32ed63a745e560350c924a.tar.bz2
fork-ledger-a034435c4287aba7fd32ed63a745e560350c924a.zip
Merge branch 'next'
Diffstat (limited to 'src/draft.cc')
-rw-r--r--src/draft.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/draft.cc b/src/draft.cc
index b4e23322..8478a31d 100644
--- a/src/draft.cc
+++ b/src/draft.cc
@@ -420,6 +420,7 @@ xact_t * draft_t::insert(journal_t& journal)
}
}
}
+ assert(new_post->account);
if (new_post.get() && ! new_post->amount.is_null()) {
found_commodity = &new_post->amount.commodity();
@@ -475,6 +476,7 @@ xact_t * draft_t::insert(journal_t& journal)
}
added->add_post(new_post.release());
+ added->posts.back()->account->add_post(added->posts.back());
added->posts.back()->set_state(item_t::UNCLEARED);
DEBUG("derive.xact", "Added new posting to derived entry");