From 63eb793abcc410218d22062efc7992983af76108 Mon Sep 17 00:00:00 2001 From: Matthias Dittrich Date: Tue, 10 Jul 2012 16:25:20 +0200 Subject: [PATCH] Fixed a NullreferenceException on startup #844 --- SparkleLib/SparkleConfig.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SparkleLib/SparkleConfig.cs b/SparkleLib/SparkleConfig.cs index 6cbcc3f8..66aebe65 100755 --- a/SparkleLib/SparkleConfig.cs +++ b/SparkleLib/SparkleConfig.cs @@ -278,7 +278,8 @@ namespace SparkleLib { public bool IdentifierExists (string identifier) { foreach (XmlNode node_folder in SelectNodes ("/sparkleshare/folder")) { - if (node_folder ["identifier"].InnerText.Equals (identifier)) + var id = node_folder ["identifier"]; + if (id != null && identifier.Equals (id.InnerText)) return true; }