]> code.delx.au - pulseaudio/commitdiff
card-restore: it's not useful to check an array, let's check the length
authorMarc-André Lureau <marc-andre.lureau@nokia.com>
Thu, 19 Feb 2009 03:49:58 +0000 (04:49 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 19 Feb 2009 03:49:58 +0000 (04:49 +0100)
src/modules/module-card-restore.c

index 909c0957ed7ceefcca86bb37782bd1f69e2611ca..c7696058b05194eb8ccf99b78451e945ad5b771e 100644 (file)
@@ -191,7 +191,7 @@ static pa_hook_result_t card_new_hook_callback(pa_core *c, pa_card_new_data *new
 
     pa_assert(new_data);
 
-    if ((e = read_entry(u, new_data->name)) && e->profile) {
+    if ((e = read_entry(u, new_data->name)) && e->profile[0]) {
 
         if (!new_data->active_profile) {
             pa_card_new_data_set_profile(new_data, e->profile);