summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/journal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal.cc b/src/journal.cc
index 3e2ecbea..7eeaabe8 100644
--- a/src/journal.cc
+++ b/src/journal.cc
@@ -151,7 +151,7 @@ account_t * journal_t::register_account(const string& name, post_t * post,
// the payee indicates an account that should be used.
if (result->name == _("Unknown")) {
foreach (account_mapping_t& value, payees_for_unknown_accounts) {
- if (value.first.match(post->xact->payee)) {
+ if (post && value.first.match(post->xact->payee)) {
result = value.second;
break;
}