]> git.alsa-project.org Git - alsa-lib.git/commitdiff
namehint: improve the previous patch (check the returned value)
authorJaroslav Kysela <perex@perex.cz>
Sun, 1 Dec 2019 13:30:54 +0000 (14:30 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sun, 1 Dec 2019 13:30:54 +0000 (14:30 +0100)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/control/namehint.c

index 4927ef973c326bef41e33b87714de87b31c1f752..60c48ae32877a2f1adabc0c55dffc5c4d41d94e3 100644 (file)
@@ -349,7 +349,8 @@ static int try_config(snd_config_t *config,
        if (snd_config_search(res, "@args", &cfg) >= 0) {
                snd_config_for_each(i, next, cfg) {
                        /* skip the argument list */
-                       snd_config_get_id(snd_config_iterator_entry(i), &str);
+                       if (snd_config_get_id(snd_config_iterator_entry(i), &str) < 0)
+                               continue;
                        while (*str && *str >= '0' && *str <= '9') str++;
                        if (*str == '\0')
                                continue;