forked from Archive/PX4-Autopilot
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…
Reference in New Issue