]> git.alsa-project.org Git - alsa-utils.git/commitdiff
amidi: optarg might be NULL, fix 't' argument parsing
authorJaroslav Kysela <perex@perex.cz>
Mon, 27 Feb 2017 08:04:08 +0000 (09:04 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 27 Feb 2017 08:04:08 +0000 (09:04 +0100)
amidi/amidi.c

index a8264f181cf3a89c26ef3451815a18bb6a17f41a..0fb032e128eeaf53b66193ad746368cf68e1964d 100644 (file)
@@ -510,7 +510,8 @@ int main(int argc, char *argv[])
                        dump = 1;
                        break;
                case 't':
-                       timeout = atof(optarg);
+                       if (optarg)
+                               timeout = atof(optarg);
                        break;
                case 'a':
                        ignore_active_sensing = 0;