summaryrefslogtreecommitdiff
path: root/src/saveload/afterload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/afterload.cpp')
-rw-r--r--src/saveload/afterload.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 0a86b701d..e350b343e 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -698,8 +698,8 @@ bool AfterLoadGame()
* becomes company 0, unless we are in the scenario editor where all the
* companies are 'invalid'.
*/
- if (!_network_dedicated && Company::IsValidID(COMPANY_FIRST)) {
- c = Company::Get(COMPANY_FIRST);
+ c = Company::GetIfValid(COMPANY_FIRST);
+ if (!_network_dedicated && c != NULL) {
c->settings = _settings_client.company;
}
}