diff --git a/Barotrauma/BarotraumaShared/Source/DebugConsole.cs b/Barotrauma/BarotraumaShared/Source/DebugConsole.cs index 078ef2755..1ad87c716 100644 --- a/Barotrauma/BarotraumaShared/Source/DebugConsole.cs +++ b/Barotrauma/BarotraumaShared/Source/DebugConsole.cs @@ -1983,6 +1983,13 @@ namespace Barotrauma { GameMain.Server.SendConsoleMessage("Command \"" + splitCommand[0] + "\" not found.", client); return; + } + + if (!MathUtils.IsValid(cursorWorldPos)) + { + GameMain.Server.SendConsoleMessage("Could not execute command \"" + command + "\" - invalid cursor position.", client); + NewMessage(client.Name + " attempted to execute the console command \"" + command + "\" with invalid cursor position.", Color.White); + return; } try