added null check to backupmanager
This commit is contained in:
parent
78c7293542
commit
95bdb6d62e
1 changed files with 7 additions and 2 deletions
|
|
@ -156,6 +156,8 @@ namespace TShockAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
Backups = new BackupManager(Path.Combine(SavePath, "backups"));
|
Backups = new BackupManager(Path.Combine(SavePath, "backups"));
|
||||||
|
Backups.KeepFor = Config.BackupKeepFor;
|
||||||
|
Backups.Interval = Config.BackupInterval;
|
||||||
Bans = new BanManager(DB);
|
Bans = new BanManager(DB);
|
||||||
Warps = new WarpManager(DB);
|
Warps = new WarpManager(DB);
|
||||||
Users = new UserManager(DB);
|
Users = new UserManager(DB);
|
||||||
|
|
@ -715,8 +717,11 @@ namespace TShockAPI
|
||||||
NPC.defaultSpawnRate = file.DefaultSpawnRate;
|
NPC.defaultSpawnRate = file.DefaultSpawnRate;
|
||||||
|
|
||||||
Main.autoSave = file.AutoSave;
|
Main.autoSave = file.AutoSave;
|
||||||
|
if (Backups != null)
|
||||||
|
{
|
||||||
Backups.KeepFor = file.BackupKeepFor;
|
Backups.KeepFor = file.BackupKeepFor;
|
||||||
Backups.Interval = file.BackupInterval;
|
Backups.Interval = file.BackupInterval;
|
||||||
|
}
|
||||||
if (!OverridePort)
|
if (!OverridePort)
|
||||||
{
|
{
|
||||||
Netplay.serverPort = file.ServerPort;
|
Netplay.serverPort = file.ServerPort;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue