Tanu Kaskinen pushed to branch master at PulseAudio / pulseaudio
Commits: 334ae350 by João Paulo Rechi Vita at 2019-01-23T15:18:22Z card: Only fire the profile available changed hook for linked cards pa_card_profile_set_available needs to check if the card is linked before firing PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED, so callbacks connected to it receive a fully initialized card object. This fixes a crash introduced by commit 30a551bbc "switch-on-port-available: Check if we need to change the active profile". - - - - - 1 changed file: - src/pulsecore/card.c Changes: ===================================== src/pulsecore/card.c ===================================== @@ -89,7 +89,8 @@ void pa_card_profile_set_available(pa_card_profile *c, pa_available_t available) pa_assert_se(core = c->card->core); pa_subscription_post(core, PA_SUBSCRIPTION_EVENT_CARD|PA_SUBSCRIPTION_EVENT_CHANGE, c->card->index); - pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED], c); + if (c->card->linked) + pa_hook_fire(&core->hooks[PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED], c); } pa_card_new_data* pa_card_new_data_init(pa_card_new_data *data) { View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/334ae350b4cdd8af2d6d3b4034f58fa0b3ad7f53 -- View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/commit/334ae350b4cdd8af2d6d3b4034f58fa0b3ad7f53 You're receiving this email because of your account on gitlab.freedesktop.org.
_______________________________________________ pulseaudio-commits mailing list pulseaudio-commits@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/pulseaudio-commits