From b17f738f13cf5f8ece3602e72ef2e0a2c48bed5b Mon Sep 17 00:00:00 2001 From: biwa <6475593+biwa@users.noreply.github.com> Date: Fri, 17 Jul 2020 20:35:59 +0200 Subject: [PATCH] Fixed a crash when highlighting undefined things --- Source/Plugins/BuilderModes/General/Association.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Plugins/BuilderModes/General/Association.cs b/Source/Plugins/BuilderModes/General/Association.cs index dd2b9a9..169c36d 100644 --- a/Source/Plugins/BuilderModes/General/Association.cs +++ b/Source/Plugins/BuilderModes/General/Association.cs @@ -138,7 +138,11 @@ namespace CodeImp.DoomBuilder.BuilderModes center = t.Position; ThingTypeInfo ti = General.Map.Data.GetThingInfoEx(t.Type); - directlinktype = ti.ThingLink; + + if (ti != null) + directlinktype = ti.ThingLink; + else + directlinktype = 0; type = UniversalType.ThingTag; tags = new HashSet(new int[] { t.Tag });