Fixed, Things mode: fixed a crash when switching to Things mode when more than 256 things were selected.

This commit is contained in:
MaxED 2016-04-29 23:19:02 +00:00 committed by spherallic
parent 099f8d316c
commit bf66e6a3ee

View file

@ -1018,13 +1018,13 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Make text labels for selected linedefs
ICollection<Thing> orderedselection = General.Map.Map.GetSelectedThings(true);
labels = new Dictionary<Thing, TextLabel>(orderedselection.Count);
// Otherwise significant delays will occure.
// Also we probably won't care about selection ordering when selecting this many anyway
if(orderedselection.Count > MAX_THING_LABELS) return;
int index = 0;
labels = new Dictionary<Thing, TextLabel>(orderedselection.Count);
foreach(Thing thing in orderedselection)
{
TextLabel l = new TextLabel();