mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-30 01:03:33 +08:00
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:
committed by
Lorenz Meier
parent
c98927121d
commit
d1a2f52246
@@ -97,6 +97,7 @@ int local_position_estimator_main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (argc < 2) {
|
if (argc < 2) {
|
||||||
usage("missing command");
|
usage("missing command");
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!strcmp(argv[1], "start")) {
|
if (!strcmp(argv[1], "start")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user