Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion core/src/km_core_processevent_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ km_core_event(
return KM_CORE_STATUS_INVALID_ARGUMENT;
}

return state->processor().external_event(state, event, data);
km_core_status status = state->processor().external_event(state, event, data);
state->apply_actions_and_merge_app_context();
return status;
}

km_core_status
Expand Down
5 changes: 4 additions & 1 deletion core/src/state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ state::state(km::core::abstract_processor & ap, km_core_option_item const *env)
_imx_callback = nullptr;
_imx_object = nullptr;
memset(const_cast<km_core_actions*>(&_action_struct), 0, sizeof(km_core_actions));
// Ensure _action_struct is initialized to the default values
km_core_action_item no_actions = {KM_CORE_IT_END, {0,}, {0}};
action_item_list_to_actions_object(&no_actions, &this->_action_struct);
}

void state::imx_register_callback(
Expand Down Expand Up @@ -117,4 +120,4 @@ void state::apply_actions_and_merge_app_context() {
}

this->_action_struct.deleted_context = km::core::get_deleted_context(app_context_for_deletion, this->_action_struct.code_points_to_delete);
}
}
Loading