[PATCH] add judgment logic before pa_streq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/modules/module-switch-on-port-available.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/modules/module-switch-on-port-available.c b/src/modules/module-switch-on-port-available.c
index de9c87092..53c5a0b32 100644
--- a/src/modules/module-switch-on-port-available.c
+++ b/src/modules/module-switch-on-port-available.c
@@ -393,6 +393,9 @@ static pa_hook_result_t card_profile_available_hook_callback(pa_core *c, pa_card
     if (profile->available != PA_AVAILABLE_NO)
         return PA_HOOK_OK;
 
+    if (!card->active_profile)
+        return PA_HOOK_OK;
+
     if (!pa_streq(profile->name, card->active_profile->name))
         return PA_HOOK_OK;
 
-- 
2.20.1






[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux