Permalink
Browse files

2008-09-03 Ivan N. Zlatev <contact@i-nz.net>

	* CodeProvider.cs: Don't assume that all definitions will be method 
	definitions in the .Designer file. Fixes a NRE.


svn path=/trunk/mwf-designer/; revision=112167
  • Loading branch information...
1 parent 77ed216 commit dfee3547b7da859cb5f77fcaf3ffcbae6c4e85e1 @ivanz ivanz committed Sep 3, 2008
Showing with 6 additions and 1 deletion.
  1. +5 −0 ChangeLog
  2. +1 −1 src/DesignTime/CodeProvider.cs
View
@@ -1,3 +1,8 @@
+2008-09-03 Ivan N. Zlatev <contact@i-nz.net>
+
+ * CodeProvider.cs: Don't assume that all definitions will be method
+ definitions in the .Designer file. Fixes a NRE.
+
2008-09-02 Ivan N. Zlatev <contact@i-nz.net>
* deps/Mono.Design/patches/DesignerHost-designer-type-replacement.patch,
@@ -314,7 +314,7 @@ private TypeDeclaration GetFirstValidType (CompilationUnit document)
if (declaration != null) {
foreach (INode child2 in declaration.Children) {
MethodDeclaration methodDecl = child2 as MethodDeclaration;
- if (methodDecl.Name == "InitializeComponent")
+ if (methodDecl != null && methodDecl.Name == "InitializeComponent")
return declaration;
}
}

0 comments on commit dfee354

Please sign in to comment.