# HG changeset patch # User rubidium # Date 1263049023 0 # Node ID a67c38f4d9275b4ebf0873d4c29f49b9365ab59f # Parent 41b2e7bf03da3edb8084e72453737ee89ddb12f9 (svn r18765) -Fix [FS#3499] (r18750): crash when trying to show cargo payments when there are 'holes' in the cargospec array diff --git a/src/graph_gui.cpp b/src/graph_gui.cpp --- a/src/graph_gui.cpp +++ b/src/graph_gui.cpp @@ -826,7 +826,7 @@ 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++; } }