From 0184b7519cb2a2f0bb227c7866efd9c25f2587d0 Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Wed, 13 Mar 2013 00:43:35 +0100 Subject: [PATCH] CecTray: try/catch xml exceptions when reading the xml config. bugzid: 2082 --- .../controller/applications/internal/XBMCController.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/LibCecTray/controller/applications/internal/XBMCController.cs b/src/LibCecTray/controller/applications/internal/XBMCController.cs index b4801e2..6b96100 100644 --- a/src/LibCecTray/controller/applications/internal/XBMCController.cs +++ b/src/LibCecTray/controller/applications/internal/XBMCController.cs @@ -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) { -- 2.34.1