Don't look for an xact's state in its entry if there isn't one.
This commit is contained in:
parent
adf8cfbbc0
commit
091144e5e8
1 changed files with 6 additions and 4 deletions
10
src/xact.cc
10
src/xact.cc
|
|
@ -54,10 +54,12 @@ optional<date_t> xact_t::effective_date() const
|
||||||
|
|
||||||
item_t::state_t xact_t::state() const
|
item_t::state_t xact_t::state() const
|
||||||
{
|
{
|
||||||
state_t entry_state = entry->state();
|
if (entry) {
|
||||||
if ((_state == UNCLEARED && entry_state != UNCLEARED) ||
|
state_t entry_state = entry->state();
|
||||||
(_state == PENDING && entry_state == CLEARED))
|
if ((_state == UNCLEARED && entry_state != UNCLEARED) ||
|
||||||
return entry_state;
|
(_state == PENDING && entry_state == CLEARED))
|
||||||
|
return entry_state;
|
||||||
|
}
|
||||||
return _state;
|
return _state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue