If a transaction's entry has no journal pointer (and this can happen with

temporaries), reference session_t::current to get at the current report
pointer.
This commit is contained in:
John Wiegley 2008-08-14 02:39:43 -04:00
parent 7a6d416f3b
commit 450cdb2b6d

View file

@ -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