fix segmentation fault when running local_position_estimator module without arguments

argv[1] was read even if argc < 2 -> segmentation fault when running without arguments
the return saves this
This commit is contained in:
Matthias Grob 2016-12-12 14:38:08 +01:00 committed by Lorenz Meier
parent c98927121d
commit d1a2f52246

View File

@ -97,6 +97,7 @@ int local_position_estimator_main(int argc, char *argv[])
if (argc < 2) {
usage("missing command");
return 1;
}
if (!strcmp(argv[1], "start")) {