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
1 changed files with 5 additions and 1 deletions

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);
if (ti != null)
directlinktype = ti.ThingLink; 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 });