summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2006-02-16 21:30:19 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 02:41:24 -0400
commit2a9c9dd09b8ae1e2d6a8fa6b82e157ec5e65e510 (patch)
tree60dbe38bc084a248988189375a776deda229580b
parent6e5bdb9b4826b8669e00f10095a0e9d9713b9695 (diff)
downloadfork-ledger-2a9c9dd09b8ae1e2d6a8fa6b82e157ec5e65e510.tar.gz
fork-ledger-2a9c9dd09b8ae1e2d6a8fa6b82e157ec5e65e510.tar.bz2
fork-ledger-2a9c9dd09b8ae1e2d6a8fa6b82e157ec5e65e510.zip
(actual_date, effective_date): Changed an assert for non-NULL to a
mere check (it happens with the 'output' command).
-rw-r--r--journal.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/journal.cc b/journal.cc
index abd12a46..6e0f9f1d 100644
--- a/journal.cc
+++ b/journal.cc
@@ -15,19 +15,15 @@ bool transaction_t::use_effective_date = false;
std::time_t transaction_t::actual_date() const
{
- if (_date == 0) {
- assert(entry);
+ if (_date == 0 && entry)
return entry->actual_date();
- }
return _date;
}
std::time_t transaction_t::effective_date() const
{
- if (_date_eff == 0) {
- assert(entry);
+ if (_date_eff == 0 && entry)
return entry->effective_date();
- }
return _date_eff;
}