Crash if dialog.Show is given wrong argument

Started by truestone

truestone Lv 1

The program aborts when dialog.Show is accidentally passed a table value that is not a dialog. For instance this LuaV2 recipe crashes the program:

dialog.Show({})

brow42 Lv 1

If you fix this one, you should fix all of the dialog functions and error() which all crash the client if the arguments are the wrong type.

truestone Lv 1

Well, I'll consider myself lucky then that is was the first time I crashed foldit due to a script error. Type errors such as passing nil (i.e. a mistype variable name) seem to be cleanly intercepted.