From b1355034470bc20323f1587e14195246ddf8bf15 Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Wed, 29 May 2019 08:42:35 +0200 Subject: [PATCH] wqueue: check before dereferencing This was found by coverity. --- src/platforms/common/px4_work_queue/test/wqueue_start.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/common/px4_work_queue/test/wqueue_start.cpp b/src/platforms/common/px4_work_queue/test/wqueue_start.cpp index 89cf64092bfc..ba3a6bedbbcb 100644 --- a/src/platforms/common/px4_work_queue/test/wqueue_start.cpp +++ b/src/platforms/common/px4_work_queue/test/wqueue_start.cpp @@ -64,7 +64,7 @@ int wqueue_test_main(int argc, char *argv[]) SCHED_PRIORITY_MAX - 5, 2000, PX4_MAIN, - (argv) ? (char *const *)&argv[2] : (char *const *)nullptr); + (argv[2]) ? (char *const *)&argv[2] : (char *const *)nullptr); return 0; }