pps_capture: add argument guard

This commit is contained in:
Igor Mišić 2021-11-22 11:13:27 +01:00 committed by Beat Küng
parent f6ced71d26
commit 17f5df2d3e
1 changed files with 1 additions and 1 deletions

View File

@ -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();
}