static struct event *last_passthrough_event(void)
{
+ i_assert(event_last_passthrough != NULL);
return container_of(event_last_passthrough,
struct event, event_passthrough);
}
event_call_callbacks_noargs(event, EVENT_CALLBACK_TYPE_FREE);
- if (last_passthrough_event() == event)
- event_last_passthrough = NULL;
+ if (event_last_passthrough != NULL) {
+ if (last_passthrough_event() == event)
+ event_last_passthrough = NULL;
+ }
if (event->log_prefix_from_system_pool)
i_free(event->log_prefix);
i_free(event->sending_name);