diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-02 01:55:55 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-02 01:55:55 -0400 |
commit | cda19829bd1100d6563b48ddb121f2afc1c55d95 (patch) | |
tree | 5b6ab0d1eb7ec1b0b3eccf817678d0aa9a3feb47 /src/draft.cc | |
parent | 017492ef5e80003073c5d053252d4a68a44260ae (diff) | |
parent | fb7cafa8965c89bbd66b09f827bd5989a87c983b (diff) | |
download | fork-ledger-cda19829bd1100d6563b48ddb121f2afc1c55d95.tar.gz fork-ledger-cda19829bd1100d6563b48ddb121f2afc1c55d95.tar.bz2 fork-ledger-cda19829bd1100d6563b48ddb121f2afc1c55d95.zip |
Merge branch 'next'
Diffstat (limited to 'src/draft.cc')
-rw-r--r-- | src/draft.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/draft.cc b/src/draft.cc index 18075731..69dc7025 100644 --- a/src/draft.cc +++ b/src/draft.cc @@ -240,6 +240,9 @@ void draft_t::parse_args(const value_t& args) xact_t * draft_t::insert(journal_t& journal) { + if (! tmpl) + return NULL; + if (tmpl->payee_mask.empty()) throw std::runtime_error(_("'xact' command requires at least a payee")); @@ -528,7 +531,8 @@ value_t xact_command(call_scope_t& args) // Only consider actual postings for the "xact" command report.HANDLER(limit_).on(string("#xact"), "actual"); - report.xact_report(post_handler_ptr(new print_xacts(report)), *new_xact); + if (new_xact) + report.xact_report(post_handler_ptr(new print_xacts(report)), *new_xact); return true; } |