Browse Source

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
sbg
Matthias Grob 8 years ago committed by Lorenz Meier
parent
commit
d1a2f52246
  1. 1
      src/modules/local_position_estimator/local_position_estimator_main.cpp

1
src/modules/local_position_estimator/local_position_estimator_main.cpp

@ -97,6 +97,7 @@ int local_position_estimator_main(int argc, char *argv[]) @@ -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")) {

Loading…
Cancel
Save