From 7e2badc3b4aa876c0abaaed2ea6dccf102f2d092 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 18 Jul 2012 15:38:34 +0200 Subject: [PATCH] Fix NullReferenceException. #858 --- SparkleShare/SparkleControllerBase.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/SparkleShare/SparkleControllerBase.cs b/SparkleShare/SparkleControllerBase.cs index 86849d53..240a2dd6 100644 --- a/SparkleShare/SparkleControllerBase.cs +++ b/SparkleShare/SparkleControllerBase.cs @@ -166,20 +166,18 @@ namespace SparkleShare { public SparkleControllerBase () { + string app_data_path = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData); + string config_path = Path.Combine (app_data_path, "sparkleshare"); + + this.config = new SparkleConfig (config_path, "config.xml"); + SparkleConfig.DefaultConfig = this.config; + FoldersPath = this.config.FoldersPath; } public virtual void Initialize () { - string app_data_path = Environment.GetFolderPath (Environment.SpecialFolder.ApplicationData); - string config_path = Path.Combine (app_data_path, "sparkleshare"); - - this.config = new SparkleConfig (config_path, "config.xml"); - SparkleConfig.DefaultConfig = this.config; - - FoldersPath = this.config.FoldersPath; - - SparklePlugin.PluginsPath = PluginsPath; + SparklePlugin.PluginsPath = PluginsPath; InstallProtocolHandler (); // Create the SparkleShare folder and add it to the bookmarks