Fix crash using picker tool on rail/road stations when no GRF classes defined

See: #575
pull/577/head
Jonathan G Rennison 11 months ago
parent 73b9028bcc
commit c8ca16e43d

@ -1123,6 +1123,9 @@ private:
*/
void EnsureSelectedStationClassIsVisible()
{
/* No additional station types present */
if (this->vscroll == nullptr) return;
uint pos = 0;
for (auto station_class : this->station_classes) {
if (station_class == _railstation.station_class) break;

@ -1252,6 +1252,9 @@ private:
void EnsureSelectedClassIsVisible()
{
/* No additional road stop types present */
if (this->vscrollList == nullptr) return;
uint pos = 0;
for (auto rs_class : this->roadstop_classes) {
if (rs_class == _roadstop_gui_settings.roadstop_class) break;

Loading…
Cancel
Save