From 8550af39d1f6d88fafd871318ff0dd0de9a7b28b Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Mon, 3 Aug 2009 21:41:55 +0000 Subject: [PATCH] * ESCLParser.cs: Fixed a potential NullReferenceException. --- Source/Converter/CHeaderToXML/ESCLParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Converter/CHeaderToXML/ESCLParser.cs b/Source/Converter/CHeaderToXML/ESCLParser.cs index d1db3881..f9b128ad 100644 --- a/Source/Converter/CHeaderToXML/ESCLParser.cs +++ b/Source/Converter/CHeaderToXML/ESCLParser.cs @@ -164,8 +164,8 @@ namespace CHeaderToXML Func GetExtension = name => { - var ext = extensions.Match(name).Value; - return String.IsNullOrEmpty(ext) ? "Core" : ext; + var match = extensions.Match(name); + return match != null && String.IsNullOrEmpty(match.Value) ? "Core" : match.Value; }; var words = line.Split(splitters, StringSplitOptions.RemoveEmptyEntries);