mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 15:08:16 +08:00
pps_capture: add argument guard
This commit is contained in:
@@ -213,7 +213,7 @@ void PPSCapture::stop()
|
|||||||
|
|
||||||
extern "C" __EXPORT int pps_capture_main(int argc, char *argv[])
|
extern "C" __EXPORT int pps_capture_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
if (!strcmp(argv[1], "stop")) {
|
if (argc >= 2 && !strcmp(argv[1], "stop") && PPSCapture::is_running()) {
|
||||||
PPSCapture::stop();
|
PPSCapture::stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user