From 95bdb6d62eb17782615ff0f16d47cfb586464e9a Mon Sep 17 00:00:00 2001 From: high Date: Sat, 23 Jul 2011 01:19:59 -0400 Subject: [PATCH] added null check to backupmanager --- TShockAPI/TShock.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index d64efad6..1d06be19 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -156,6 +156,8 @@ namespace TShockAPI } Backups = new BackupManager(Path.Combine(SavePath, "backups")); + Backups.KeepFor = Config.BackupKeepFor; + Backups.Interval = Config.BackupInterval; Bans = new BanManager(DB); Warps = new WarpManager(DB); Users = new UserManager(DB); @@ -715,8 +717,11 @@ namespace TShockAPI NPC.defaultSpawnRate = file.DefaultSpawnRate; Main.autoSave = file.AutoSave; - Backups.KeepFor = file.BackupKeepFor; - Backups.Interval = file.BackupInterval; + if (Backups != null) + { + Backups.KeepFor = file.BackupKeepFor; + Backups.Interval = file.BackupInterval; + } if (!OverridePort) { Netplay.serverPort = file.ServerPort;