From my own debugging, the crash appears to be in this line:
if (!s->userdata->client || avahi_client_get_state(s->userdata->client) != AVAHI_CLIENT_S_RUNNING) return;
adding a check for !s->userdata seems to fix the issue (for some reason, probably due to a race condition, userdata is null at the time of the call).
From my own debugging, the crash appears to be in this line:
if (!s->userdata- >client || avahi_client_ get_state( s->userdata- >client) != AVAHI_CLIENT_ S_RUNNING)
return;
adding a check for !s->userdata seems to fix the issue (for some reason, probably due to a race condition, userdata is null at the time of the call).