summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--textual.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/textual.cc b/textual.cc
index 61cf37f8..b80c820c 100644
--- a/textual.cc
+++ b/textual.cc
@@ -261,8 +261,8 @@ transaction_t * parse_transaction(char * line, account_t * account,
if (xact->amount.commodity() &&
! xact->amount.commodity().annotated)
xact->amount.annotate_commodity(per_unit_cost,
- xact->entry->actual_date(),
- xact->entry->code);
+ xact->entry ? xact->entry->actual_date() : datetime_t(),
+ xact->entry ? xact->entry->code : "");
DEBUG_PRINT("ledger.textual.parse", "line " << linenum << ": " <<
"Total cost is " << *xact->cost);