From 34cf407330d8ac05ba59a91d2be1ce2eddde8553 Mon Sep 17 00:00:00 2001
From: spherallic <spherallic@gmail.com>
Date: Fri, 24 May 2024 21:08:45 +0200
Subject: [PATCH] Fix unknown thing types crashing because of unknown stringarg
 info

---
 Source/Core/Controls/ThingInfoPanel.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Source/Core/Controls/ThingInfoPanel.cs b/Source/Core/Controls/ThingInfoPanel.cs
index 9c6e88ce4..186da8fce 100644
--- a/Source/Core/Controls/ThingInfoPanel.cs
+++ b/Source/Core/Controls/ThingInfoPanel.cs
@@ -145,8 +145,8 @@ namespace CodeImp.DoomBuilder.Controls
 			}
 
 			// Arguments
-			ArgumentInfo[] arginfo = ((t.Action == 0 && ti.Args[0] != null) ? ti.Args : act.Args); //mxd
-			ArgumentInfo[] stringarginfo = ti.StringArgs;
+			ArgumentInfo[] arginfo = (t.Action == 0 && ti.Args[0] != null) ? ti.Args : act.Args; //mxd
+			ArgumentInfo[] stringarginfo = ti.StringArgs[0] != null ? ti.StringArgs : act.StringArgs;
 
             //mxd. ACS script argument names
             bool isacsscript = (Array.IndexOf(GZGeneral.ACS_SPECIALS, t.Action) != -1);
-- 
GitLab