(svn r27425) -Fix [FS#5842]: Crash when switching to or taking over companies, when an order window of a vehicle of the new company was opened. Now close those windows.

This commit is contained in:
frosch
2015-10-30 17:23:16 +00:00
parent e51abf1796
commit c74ffeecd1
2 changed files with 7 additions and 0 deletions

View File

@@ -1207,6 +1207,7 @@ void ChangeWindowOwner(Owner old_owner, Owner new_owner)
case WC_BUY_COMPANY:
case WC_COMPANY:
case WC_COMPANY_INFRASTRUCTURE:
case WC_VEHICLE_ORDERS: // Changing owner would also require changing WindowDesc, which is not possible; however keeping the old one crashes because of missing widgets etc.. See ShowOrdersWindow().
continue;
default: