]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
ctl: fix misfunction of alsactl_get_card_id_list() topic/fix-v0.2.1
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 15 Mar 2022 23:30:07 +0000 (08:30 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 15 Mar 2022 23:30:07 +0000 (08:30 +0900)
Even if instantiation of libudev enumerator is successful,
alsactl_get_card_id_list() handles the success as failure. As a result,
the function does not work at all.

This commit fixes the bug.

Fixes: bfe4b0589fc6 ("ctl/hwdep/rawmidi: fix uninitialized warning")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/ctl/query.c

index cfaef2a52cd20b9e87cfb50d59343bd56d394865..1430643d3bdcb7e831852ae9b8566b395fa59611 100644 (file)
@@ -128,7 +128,7 @@ void alsactl_get_card_id_list(guint **entries, gsize *entry_count,
     g_return_if_fail(error == NULL || *error == NULL);
 
     prepare_udev_enum(&enumerator, error);
-    if (*error == NULL)
+    if (*error != NULL)
         return;
 
     entry_list = udev_enumerate_get_list_entry(enumerator);