From b9052fff9fa4f0c836d4e1d7f85c23c4fb4150a2 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 9 Jan 2010 14:57:03 +0000 Subject: (svn r18765) -Fix [FS#3499] (r18750): crash when trying to show cargo payments when there are 'holes' in the cargospec array --- src/graph_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp index fca74b3b7..4867ffa61 100644 --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -826,7 +826,7 @@ struct PaymentRatesGraphWindow : BaseGraphWindow { int i = 0; const CargoSpec *cs; FOR_ALL_CARGOSPECS(cs) { - this->SetWidgetLoweredState(CPW_CARGO_FIRST + i, !HasBit(_legend_excluded_cargo, i)); + this->SetWidgetLoweredState(CPW_CARGO_FIRST + cs->Index(), !HasBit(_legend_excluded_cargo, i)); i++; } } -- cgit v1.2.3-54-g00ecf