diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-05 17:46:55 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-05 17:46:55 -0600 |
commit | f9de33d21cd62d953147d62e01958557562a1311 (patch) | |
tree | d05558e78ba3a89a51fb27e2d1c234b93a8b458f /src/account.cc | |
parent | b6adc8f4605befc2e6a91dfa28cc9237fb391fbc (diff) | |
download | fork-ledger-f9de33d21cd62d953147d62e01958557562a1311.tar.gz fork-ledger-f9de33d21cd62d953147d62e01958557562a1311.tar.bz2 fork-ledger-f9de33d21cd62d953147d62e01958557562a1311.zip |
Removed an invalid assertion
Diffstat (limited to 'src/account.cc')
-rw-r--r-- | src/account.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/account.cc b/src/account.cc index 40ddf70b..e1874839 100644 --- a/src/account.cc +++ b/src/account.cc @@ -137,7 +137,10 @@ void account_t::add_post(post_t * post) bool account_t::remove_post(post_t * post) { - assert(! posts.empty()); + // It's possible that 'post' wasn't yet in this account, but try to + // remove it anyway. This can happen if there is an error during + // parsing, when the posting knows what it's account is, but + // xact_t::finalize has not yet added that posting to the account. posts.remove(post); post->account = NULL; return true; |