Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Commit

Permalink
2008-09-03 Ivan N. Zlatev <contact@i-nz.net>
Browse files Browse the repository at this point in the history
	* 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
ivanz committed Sep 3, 2008
1 parent 77ed216 commit dfee354
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/DesignTime/CodeProvider.cs
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit dfee354

Please sign in to comment.