mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
pps_capture: add argument guard
This commit is contained in:
parent
f6ced71d26
commit
17f5df2d3e
@ -213,7 +213,7 @@ void PPSCapture::stop()
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user