[Monodevelop-patches-list] r1791 - in trunk/MonoDevelop/src/Main/Base: . Services/ParserService
commit-watcher at mono-cvs.ximian.com
commit-watcher at mono-cvs.ximian.com
Sun Jun 20 16:13:15 EDT 2004
Author: tberman
Date: 2004-06-20 16:13:15 -0400 (Sun, 20 Jun 2004)
New Revision: 1791
Modified:
trunk/MonoDevelop/src/Main/Base/ChangeLog
trunk/MonoDevelop/src/Main/Base/Services/ParserService/CodeCompletionDatabase.cs
Log:
add nullcheck
Modified: trunk/MonoDevelop/src/Main/Base/ChangeLog
===================================================================
--- trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-06-20 19:00:37 UTC (rev 1790)
+++ trunk/MonoDevelop/src/Main/Base/ChangeLog 2004-06-20 20:13:15 UTC (rev 1791)
@@ -1,5 +1,10 @@
2004-06-20 Todd Berman <tberman at off.net>
+ * Services/ParserService/CodeCompletionDatabase.cs: fix nullref in
+ file types that dont have a parser.
+
+2004-06-20 Todd Berman <tberman at off.net>
+
* Gui/Workbench/Layouts/SdiWorkspaceLayout.cs: fix bug #60352.
2004-06-18 Todd Berman <tberman at off.net>
Modified: trunk/MonoDevelop/src/Main/Base/Services/ParserService/CodeCompletionDatabase.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Base/Services/ParserService/CodeCompletionDatabase.cs 2004-06-20 19:00:37 UTC (rev 1790)
+++ trunk/MonoDevelop/src/Main/Base/Services/ParserService/CodeCompletionDatabase.cs 2004-06-20 20:13:15 UTC (rev 1791)
@@ -686,10 +686,12 @@
protected override void ParseFile (string fileName)
{
IParseInformation parserInfo = parserService.DoParseFile ((string)fileName, null);
- ICompilationUnit cu = (ICompilationUnit)parserInfo.BestCompilationUnit;
-
- ClassUpdateInformation res = UpdateFromParseInfo (parserInfo, fileName);
- if (res != null) parserService.NotifyParseInfoChange (fileName, res);
+ if (parserInfo != null) {
+ ICompilationUnit cu = (ICompilationUnit)parserInfo.BestCompilationUnit;
+
+ ClassUpdateInformation res = UpdateFromParseInfo (parserInfo, fileName);
+ if (res != null) parserService.NotifyParseInfoChange (fileName, res);
+ }
}
public ClassUpdateInformation UpdateFromParseInfo (IParseInformation parserInfo, string fileName)
More information about the Monodevelop-patches-list
mailing list