From 5c18da0470b92fcb4fb174620e2805af1b27f49d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Tue, 17 Mar 2009 09:24:32 +0000 Subject: [PATCH] * Src/Lexer/AbstractLexer.cs: Added null check. git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3867 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61 --- .../NRefactory/Project/Src/Lexer/AbstractLexer.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Libraries/NRefactory/Project/Src/Lexer/AbstractLexer.cs b/src/Libraries/NRefactory/Project/Src/Lexer/AbstractLexer.cs index 805d81dd9b..571d22849c 100644 --- a/src/Libraries/NRefactory/Project/Src/Lexer/AbstractLexer.cs +++ b/src/Libraries/NRefactory/Project/Src/Lexer/AbstractLexer.cs @@ -48,11 +48,13 @@ namespace ICSharpCode.NRefactory.Parser protected static IEnumerable GetSymbols (string symbols) { - foreach (string symbol in symbols.Split (';')) { - string s = symbol.Trim (); - if (s.Length == 0) - continue; - yield return s; + if (!string.IsNullOrEmpty(symbols)) { + foreach (string symbol in symbols.Split (';')) { + string s = symbol.Trim (); + if (s.Length == 0) + continue; + yield return s; + } } }