diff options
-rw-r--r-- | src/entry.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/entry.cc b/src/entry.cc index 97bc90f1..7cb4b926 100644 --- a/src/entry.cc +++ b/src/entry.cc @@ -401,7 +401,13 @@ expr_t::ptr_op_t entry_t::lookup(const string& name) return WRAP_FUNCTOR(get_wrapper<&get_payee>); break; } - return journal->owner->current_report->lookup(name); + + if (journal) { + assert(journal->owner == session_t::current); + return journal->owner->current_report->lookup(name); + } else { + return session_t::current->current_report->lookup(name); + } } bool entry_t::valid() const |