Add a null check
This commit is contained in:
parent
7e7068294f
commit
0043fc35d7
1 changed files with 1 additions and 1 deletions
|
|
@ -2162,7 +2162,7 @@ namespace TShockAPI
|
|||
{
|
||||
string warpName = String.Join(" ", args.Parameters);
|
||||
var warp = TShock.Warps.Find(warpName);
|
||||
if (warp.Position != Point.Zero)
|
||||
if (warp != null)
|
||||
{
|
||||
if (args.Player.Teleport(warp.Position.X * 16, warp.Position.Y * 16))
|
||||
args.Player.SendSuccessMessage("Warped to " + warpName + ".");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue