mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-20 03:13:44 +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[])
|
||||
{
|
||||
if (!strcmp(argv[1], "stop")) {
|
||||
if (argc >= 2 && !strcmp(argv[1], "stop") && PPSCapture::is_running()) {
|
||||
PPSCapture::stop();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user