From 639afeb28f92bb289cd449aaa2caf7bd87fc18e7 Mon Sep 17 00:00:00 2001 From: Mark Charlebois Date: Fri, 10 Apr 2015 22:16:30 -0700 Subject: [PATCH] Fixed issue with argc check Was checking if argc < 1 and then accessing argv[1]. Fixed by checking if argc < 2. Signed-off-by: Mark Charlebois --- .../attitude_estimator_ekf/attitude_estimator_ekf_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp b/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp index affe6a68a4..3a09b44bb1 100755 --- a/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp +++ b/src/modules/attitude_estimator_ekf/attitude_estimator_ekf_main.cpp @@ -128,7 +128,7 @@ int attitude_estimator_ekf_main(int argc, char *argv[]) if (thread_running) { warnx("already running\n"); /* this is not an error */ - exit(0); + return 0; } thread_should_exit = false;