From dbfe28cddcdbc7643ea0f18643f7129b491d644c Mon Sep 17 00:00:00 2001 From: Kenneth Skovhede Date: Sat, 7 Dec 2013 15:25:19 +0100 Subject: [PATCH] Fixed crash when reading modules with no options --- Duplicati/Server/Serializable/ServerSettings.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Duplicati/Server/Serializable/ServerSettings.cs b/Duplicati/Server/Serializable/ServerSettings.cs index 7dbd7fda1..b4fee0524 100644 --- a/Duplicati/Server/Serializable/ServerSettings.cs +++ b/Duplicati/Server/Serializable/ServerSettings.cs @@ -38,7 +38,8 @@ namespace Duplicati.Server.Serializable { this.Key = backend.ProtocolKey; this.Description = backend.Description; - this.Options = backend.SupportedCommands.ToArray(); + if (backend.SupportedCommands != null) + this.Options = backend.SupportedCommands.ToArray(); } /// @@ -48,7 +49,8 @@ namespace Duplicati.Server.Serializable { this.Key = module.FilenameExtension; this.Description = module.Description; - this.Options = module.SupportedCommands.ToArray(); + if (module.SupportedCommands != null) + this.Options = module.SupportedCommands.ToArray(); } /// @@ -58,7 +60,8 @@ namespace Duplicati.Server.Serializable { this.Key = module.FilenameExtension; this.Description = module.Description; - this.Options = module.SupportedCommands.ToArray(); + if (module.SupportedCommands != null) + this.Options = module.SupportedCommands.ToArray(); } /// @@ -68,7 +71,8 @@ namespace Duplicati.Server.Serializable { this.Key = module.Key; this.Description = module.Description; - this.Options = module.SupportedCommands.ToArray(); + if (module.SupportedCommands != null) + this.Options = module.SupportedCommands.ToArray(); } ///