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

This commit is contained in:
Peter Nelson 2024-06-07 21:57:18 +01:00 committed by GitHub
parent 79b573704b
commit df1b6a933b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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);
}
}
};