Fix crash using picker tool on rail/road stations when no GRF classes defined
See: #575
This commit is contained in:
@@ -1123,6 +1123,9 @@ private:
|
|||||||
*/
|
*/
|
||||||
void EnsureSelectedStationClassIsVisible()
|
void EnsureSelectedStationClassIsVisible()
|
||||||
{
|
{
|
||||||
|
/* No additional station types present */
|
||||||
|
if (this->vscroll == nullptr) return;
|
||||||
|
|
||||||
uint pos = 0;
|
uint pos = 0;
|
||||||
for (auto station_class : this->station_classes) {
|
for (auto station_class : this->station_classes) {
|
||||||
if (station_class == _railstation.station_class) break;
|
if (station_class == _railstation.station_class) break;
|
||||||
|
@@ -1252,6 +1252,9 @@ private:
|
|||||||
|
|
||||||
void EnsureSelectedClassIsVisible()
|
void EnsureSelectedClassIsVisible()
|
||||||
{
|
{
|
||||||
|
/* No additional road stop types present */
|
||||||
|
if (this->vscrollList == nullptr) return;
|
||||||
|
|
||||||
uint pos = 0;
|
uint pos = 0;
|
||||||
for (auto rs_class : this->roadstop_classes) {
|
for (auto rs_class : this->roadstop_classes) {
|
||||||
if (rs_class == _roadstop_gui_settings.roadstop_class) break;
|
if (rs_class == _roadstop_gui_settings.roadstop_class) break;
|
||||||
|
Reference in New Issue
Block a user