summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/post.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/post.cc b/src/post.cc
index 4f3ed48a..72930b46 100644
--- a/src/post.cc
+++ b/src/post.cc
@@ -106,8 +106,10 @@ date_t post_t::primary_date() const
return xdata_->date;
if (! _date) {
- assert(xact);
- return xact->date();
+ if (xact)
+ return xact->date();
+ else
+ return CURRENT_DATE();
}
return *_date;
}