From 17f5df2d3ebfd4848b107fb449c970d9a75d7f41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Mi=C5=A1i=C4=87?= Date: Mon, 22 Nov 2021 11:13:27 +0100 Subject: [PATCH] pps_capture: add argument guard --- src/drivers/pps_capture/PPSCapture.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/pps_capture/PPSCapture.cpp b/src/drivers/pps_capture/PPSCapture.cpp index 3efea51f86..5d75c7ef40 100644 --- a/src/drivers/pps_capture/PPSCapture.cpp +++ b/src/drivers/pps_capture/PPSCapture.cpp @@ -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(); }