From 3d89cf08f6162014b9e365650120dcad15c85d31 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 21 Aug 2022 21:10:05 +0300 Subject: [PATCH 44/44] dai_auto_settler_run(): Fix clang analyze warning See osdn #45315 Signed-off-by: Marko Lindqvist --- ai/default/daisettler.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ai/default/daisettler.c b/ai/default/daisettler.c index 979c3feb10..09a98274fe 100644 --- a/ai/default/daisettler.c +++ b/ai/default/daisettler.c @@ -1163,9 +1163,10 @@ BUILD_CITY: adv_unit_new_task(punit, AUT_AUTO_SETTLER, best_tile); } - if (auto_settler_setup_work(pplayer, punit, state, 0, path, - best_tile, best_act, &best_target, - completion_time)) { + if (best_tile != NULL + && auto_settler_setup_work(pplayer, punit, state, 0, path, + best_tile, best_act, &best_target, + completion_time)) { if (pcity != NULL) { clear_worker_tasks(pcity); } -- 2.35.1