diff options
author | John Wiegley <johnw@newartisans.com> | 2008-07-17 20:09:28 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-07-17 20:55:15 -0400 |
commit | 595452e332f338c27a3d7befb75f1b39e5a4f9a7 (patch) | |
tree | 6faeae4b02922880af3c954ed9c173db9e8447de /textual.cc | |
parent | 5f472969cdc10e5b41f0f66502b2310ca39577b3 (diff) | |
download | ledger-595452e332f338c27a3d7befb75f1b39e5a4f9a7.tar.gz ledger-595452e332f338c27a3d7befb75f1b39e5a4f9a7.tar.bz2 ledger-595452e332f338c27a3d7befb75f1b39e5a4f9a7.zip |
Protect against a case where xact->entry may legitimately be NULL.
Diffstat (limited to 'textual.cc')
-rw-r--r-- | textual.cc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |