From 091144e5e83557b3940719b256ef63f6b54d099a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 19 Jan 2009 22:23:27 -0400 Subject: Don't look for an xact's state in its entry if there isn't one. --- src/xact.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/xact.cc') diff --git a/src/xact.cc b/src/xact.cc index 66c08f5b..7f441b49 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -54,10 +54,12 @@ optional xact_t::effective_date() const item_t::state_t xact_t::state() const { - state_t entry_state = entry->state(); - if ((_state == UNCLEARED && entry_state != UNCLEARED) || - (_state == PENDING && entry_state == CLEARED)) - return entry_state; + if (entry) { + state_t entry_state = entry->state(); + if ((_state == UNCLEARED && entry_state != UNCLEARED) || + (_state == PENDING && entry_state == CLEARED)) + return entry_state; + } return _state; } -- cgit v1.2.3