From: Peter Meerwald <p.meerwald@xxxxxxxxxxxxxxxxxx> CID 1323615 check and warn if pa_card_set_profile() fails --- src/modules/module-card-restore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/module-card-restore.c b/src/modules/module-card-restore.c index 5c55cec..eb6c94a 100644 --- a/src/modules/module-card-restore.c +++ b/src/modules/module-card-restore.c @@ -442,7 +442,8 @@ static pa_hook_result_t profile_available_changed_callback(void *hook_data, void return PA_HOOK_OK; pa_log_info("Card %s profile %s became available, activating.", card->name, profile->name); - pa_card_set_profile(profile->card, profile, true); + if (pa_card_set_profile(profile->card, profile, true) != 0) + pa_log_warn("Could not set profile '%s'", profile->name); return PA_HOOK_OK; } -- 1.7.9.5