summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-05-27 23:37:47 +0000
committeryexo <yexo@openttd.org>2009-05-27 23:37:47 +0000
commitdf7786f7899edd54456b42ac12469c364a737457 (patch)
tree9c70a5df229a4cb70ee14f8f95ffbccb890d304f /src
parent45af2a294c813eb87fe130d0fbcdba0af254963e (diff)
downloadopenttd-df7786f7899edd54456b42ac12469c364a737457.tar.xz
(svn r16453) -Fix: Move some code around so a company is no longer used after deleting it
Diffstat (limited to 'src')
-rw-r--r--src/economy.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/economy.cpp b/src/economy.cpp
index a47cf74de..0b9497812 100644
--- a/src/economy.cpp
+++ b/src/economy.cpp
@@ -562,9 +562,8 @@ static void CompaniesGenStatistics()
if (c->num_valid_stat_ent != 24) c->num_valid_stat_ent++;
UpdateCompanyRatingAndValue(c, true);
- CompanyCheckBankrupt(c);
-
if (c->block_preview != 0) c->block_preview--;
+ CompanyCheckBankrupt(c);
}
InvalidateWindow(WC_INCOME_GRAPH, 0);