summaryrefslogtreecommitdiff
path: root/src/journal.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2013-09-20 00:54:21 -0500
committerJohn Wiegley <johnw@newartisans.com>2013-09-20 00:54:43 -0500
commitd30c3fb869b8c4f7740eefec573fadedbe21b7d1 (patch)
tree8432e3e4d5feb193c27a396c57230dc462daa58f /src/journal.cc
parent8048581ac8c3343e59274f66d646087571d6ea38 (diff)
downloadfork-ledger-d30c3fb869b8c4f7740eefec573fadedbe21b7d1.tar.gz
fork-ledger-d30c3fb869b8c4f7740eefec573fadedbe21b7d1.tar.bz2
fork-ledger-d30c3fb869b8c4f7740eefec573fadedbe21b7d1.zip
Guard against a possible null value
Diffstat (limited to 'src/journal.cc')
-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;
}