Add a stack_trace to tgui input lists passed nulls

This commit is contained in:
Aronai Sieyes
2021-07-05 01:55:51 -04:00
parent ab49245fc9
commit d0a10ec70f
+4
View File
@@ -99,6 +99,10 @@
var/static/regex/whitelistedWords = regex(@{"([^\u0020-\u8000]+)"})
for(var/i in buttons)
if(isnull(i))
stack_trace("Null in a tgui_input_list() buttons")
continue
var/string_key = whitelistedWords.Replace("[i]", "")
//avoids duplicated keys E.g: when areas have the same name