UDBScript: fixed a problem where the UDB.log() method crashed when a non-string object was passed to it

This commit is contained in:
biwa 2022-01-07 11:51:04 +01:00
parent 92fefb766a
commit 8992b66df5

View file

@ -259,9 +259,12 @@ namespace CodeImp.DoomBuilder.UDBScript.Wrapper
/// Adds a line to the script log. Also shows the script running dialog.
/// </summary>
/// <param name="text">Line to add to the script log</param>
public void log(string text)
public void log(object text)
{
logger.Report(text);
if (text == null)
return;
logger.Report(text.ToString());
}
/// <summary>