From 11b586e091de888687b53506c32bc0d78248b2af 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 432e034fa..5db2f638d 100755 --- a/Source/Plugins/BuilderModes/General/Association.cs +++ b/Source/Plugins/BuilderModes/General/Association.cs @@ -137,7 +137,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<int>(new int[] { t.Tag }); -- GitLab