1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-31 02:19:09 +00:00

Fix #12764: Crash when opening Detailed performance rating window with no companies. (#12765)

This commit is contained in:
2024-06-07 21:57:18 +01:00
committed by GitHub
parent 79b573704b
commit df1b6a933b

View File

@@ -1402,7 +1402,9 @@ struct PerformanceRatingDetailWindow : Window {
}
/* Make sure the widget is lowered */
this->LowerWidget(WID_PRD_COMPANY_FIRST + this->company);
if (this->company != INVALID_COMPANY) {
this->LowerWidget(WID_PRD_COMPANY_FIRST + this->company);
}
}
};