summaryrefslogtreecommitdiff
path: root/src/company_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r--src/company_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index a2dbbab7b..37e857a3f 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -89,6 +89,9 @@ void SetLocalCompany(CompanyID new_company)
/* company could also be COMPANY_SPECTATOR or OWNER_NONE */
assert(Company::IsValidID(new_company) || new_company == COMPANY_SPECTATOR || new_company == OWNER_NONE);
+ /* Delete the chat window, if you were team chatting. */
+ InvalidateWindowData(WC_SEND_NETWORK_MSG, DESTTYPE_TEAM, _local_company);
+
_local_company = new_company;
/* Delete any construction windows... */