# HG changeset patch # User SamuXarick <43006711+SamuXarick@users.noreply.github.com> # Date 2019-04-11 06:35:46 # Node ID a351d794c5b875c6905bc3a1db0104cba3c48433 # Parent 36c15679007d31e3c530a2236316779393fbe226 Fix 50e08f333a: Creating a cargo subsidy with town as source did not consider min population. (#7493) diff --git a/src/subsidy.cpp b/src/subsidy.cpp --- a/src/subsidy.cpp +++ b/src/subsidy.cpp @@ -333,6 +333,7 @@ bool FindSubsidyTownCargoRoute() /* Select a random town. */ const Town *src_town = Town::GetRandom(); + if (src_town->cache.population < SUBSIDY_CARGO_MIN_POPULATION) return false; CargoTypes town_cargo_produced = src_town->cargo_produced;