From: Lars Op den Kamp Date: Tue, 12 Mar 2013 23:43:35 +0000 (+0100) Subject: CecTray: try/catch xml exceptions when reading the xml config. bugzid: 2082 X-Git-Tag: upstream/2.2.0~1^2~4^2~24 X-Git-Url: https://git.piment-noir.org/?p=deb_libcec.git;a=commitdiff_plain;h=0184b7519cb2a2f0bb227c7866efd9c25f2587d0 CecTray: try/catch xml exceptions when reading the xml config. bugzid: 2082 --- 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) {