fix emitter_dispatch

This commit is contained in:
xianjimli 2020-11-03 09:13:30 +08:00
parent 9582263fa8
commit 8c3ab713f8

View File

@ -129,8 +129,8 @@ ret_t emitter_dispatch(emitter_t* emitter, event_t* e) {
if (iter->type == e->type) {
ret = iter->handler(iter->ctx, e);
if (ret == RET_STOP) {
emitter->curr_iter = NULL;
if (emitter->remove_curr_iter) {
emitter->curr_iter = NULL;
emitter->remove_curr_iter = FALSE;
emitter_remove_item(emitter, iter);
}