Fixed a crash when highlighting undefined things

This commit is contained in:
biwa 2020-07-17 20:35:59 +02:00 committed by spherallic
parent 84a48ea22a
commit b17f738f13

View file

@ -138,7 +138,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
center = t.Position; center = t.Position;
ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.Type); ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.Type);
directlinktype = ti.ThingLink;
if (ti != null)
directlinktype = ti.ThingLink;
else
directlinktype = 0;
type = UniversalType.ThingTag; type = UniversalType.ThingTag;
tags = new HashSet<int>(new int[] { t.Tag }); tags = new HashSet<int>(new int[] { t.Tag });