From b4d7acead35cb865556b83eb4a1e71542f86add8 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 10 Jun 2024 17:53:37 +0200 Subject: [PATCH] initialize variable, fix crash --- src/move.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/move.c b/src/move.c index 5e17ca844..c60b5ceeb 100644 --- a/src/move.c +++ b/src/move.c @@ -1899,7 +1899,7 @@ static void sail(unit * u, order * ord, bool drifting) double damage_storm = storms_enabled ? config_get_flt("rules.ship.damage_storm", 0.02) : 0.0; int lighthouse_div = config_get_int("rules.storm.lighthouse.divisor", 0); const char *token = getstrtoken(); - building *harbour; + building *harbour = NULL; error = movewhere(u, token, starting_point, &next_point); if (error) {