summaryrefslogtreecommitdiff
path: root/src/account.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-03-05 17:46:55 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-03-05 17:46:55 -0600
commitf9de33d21cd62d953147d62e01958557562a1311 (patch)
treed05558e78ba3a89a51fb27e2d1c234b93a8b458f /src/account.cc
parentb6adc8f4605befc2e6a91dfa28cc9237fb391fbc (diff)
downloadfork-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.cc5
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;