CecTray: try/catch xml exceptions when reading the xml config. bugzid: 2082
authorLars Op den Kamp <lars@opdenkamp.eu>
Tue, 12 Mar 2013 23:43:35 +0000 (00:43 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Tue, 12 Mar 2013 23:48:12 +0000 (00:48 +0100)
src/LibCecTray/controller/applications/internal/XBMCController.cs

index b4801e2e62a40252f3aef5e7060639e3c6aa81e7..6b961008986ed01cd26ae12f724eda227c62be1a 100644 (file)
@@ -93,8 +93,13 @@ namespace LibCECTray.controller.applications.@internal
       if (File.Exists(filename))
       {
         XmlTextReader reader = new XmlTextReader(filename);
-        while (reader.Read())
+        while (true)
         {
+          try
+          {
+            if (!reader.Read())
+              break;
+          } catch (XmlException) {}
           gotConfig = true;
           switch (reader.NodeType)
           {