diff options
Diffstat (limited to 'src/components/application_manager/src/application_state.cc')
-rw-r--r-- | src/components/application_manager/src/application_state.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/application_manager/src/application_state.cc b/src/components/application_manager/src/application_state.cc index adaefd2e95..ee43d32b0a 100644 --- a/src/components/application_manager/src/application_state.cc +++ b/src/components/application_manager/src/application_state.cc @@ -205,7 +205,12 @@ void ApplicationState::RemoveHMIState(const WindowID window_id, void ApplicationState::EraseHMIState(HmiStates& hmi_states, HmiStates::iterator it) { if (hmi_states.begin() == it) { - (*it)->set_parent(nullptr); + HmiStates::iterator next = it; + ++next; + if (hmi_states.end() != next) { + HmiStatePtr next_state = *next; + next_state->set_parent(nullptr); + } } else { HmiStates::iterator next = it; HmiStates::iterator prev = it; |