amidi: optarg might be NULL, fix 't' argument parsing

This commit is contained in:
Jaroslav Kysela 2017-02-27 09:04:08 +01:00
parent 1fefc14402
commit 1314abd2d6

View file

@ -510,6 +510,7 @@ int main(int argc, char *argv[])
dump = 1; dump = 1;
break; break;
case 't': case 't':
if (optarg)
timeout = atof(optarg); timeout = atof(optarg);
break; break;
case 'a': case 'a':