Kromtec / LegendsViewer

Recreates Dwarf Fortress' Legends Mode from exported files.
GNU General Public License v3.0
62 stars 19 forks source link

Crash in charts #25

Closed Algorithman closed 7 years ago

Algorithman commented 7 years ago

If you select a chart of a fort (with quite something going on) and then switch to World->Historical Figures Remaining, it crashes if there are some historical figures of UNKNOWN race.

ChartPanel.cs line 495: var hfKilled = World.Events.OfType().GroupBy(death => death.HistoricalFigure.Race).Select(hf => new { Race = hf.Key, Count = hf.Count() }).OrderBy(hf => hfTotals.IndexOf(hfTotals.First(hf1 => hf1.Race == hf.Race))).ToList();

Kromtec commented 7 years ago

Thanks, to order this list wasn't even necessary in the first place.