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,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;