summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTobias Pankrath <tobias@pankrath.net>2020-01-08 19:05:09 +0100
committerJohn Wiegley <johnw@newartisans.com>2020-01-08 16:03:49 -0800
commitb2483e75c0ba53349bb8a0c2dbf1c29e0b42cd88 (patch)
tree846f95e617374c816903df24c735e5986e715a8a /src
parent98cb8b1dc7a0d6ea4964e971dbcaa9ea669dc1f9 (diff)
downloadfork-ledger-b2483e75c0ba53349bb8a0c2dbf1c29e0b42cd88.tar.gz
fork-ledger-b2483e75c0ba53349bb8a0c2dbf1c29e0b42cd88.tar.bz2
fork-ledger-b2483e75c0ba53349bb8a0c2dbf1c29e0b42cd88.zip
fix #1850: segfault when using ledger print
Diffstat (limited to 'src')
-rw-r--r--src/journal.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/journal.cc b/src/journal.cc
index db909bb4..6b28f519 100644
--- a/src/journal.cc
+++ b/src/journal.cc
@@ -136,7 +136,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 (post && value.first.match(post->xact->payee)) {
+ if (post && post->xact && value.first.match(post->xact->payee)) {
result = value.second;
break;
}