Fixes null exception thrown on /save
TShock.Players was not being checked for null objects. Reported by InanZen.
This commit is contained in:
parent
2b0549f04c
commit
ed0756e80c
1 changed files with 6 additions and 6 deletions
|
|
@ -2172,14 +2172,14 @@ namespace TShockAPI
|
|||
|
||||
private static void Save(CommandArgs args)
|
||||
{
|
||||
SaveManager.Instance.SaveWorld(false);
|
||||
foreach (TSPlayer tsply in TShock.Players)
|
||||
{
|
||||
tsply.SaveServerInventory();
|
||||
}
|
||||
SaveManager.Instance.SaveWorld(false);
|
||||
foreach (TSPlayer tsply in TShock.Players.Where(tsply => tsply != null))
|
||||
{
|
||||
tsply.SaveServerInventory();
|
||||
}
|
||||
}
|
||||
|
||||
private static void Settle(CommandArgs args)
|
||||
private static void Settle(CommandArgs args)
|
||||
{
|
||||
if (Liquid.panicMode)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue