Permalink
Browse files

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

	* CodeProvider.cs: Fix one more NRE in GetCompatibleMethods.


svn path=/trunk/mwf-designer/; revision=112168
  • Loading branch information...
1 parent dfee354 commit 8358270ea1c47a4246a141a9435a3b6c06834235 @ivanz ivanz committed Sep 3, 2008
Showing with 5 additions and 1 deletion.
  1. +4 −0 ChangeLog
  2. +1 −1 src/DesignTime/CodeProvider.cs
View
@@ -1,5 +1,9 @@
2008-09-03 Ivan N. Zlatev <contact@i-nz.net>
+ * CodeProvider.cs: Fix one more NRE in GetCompatibleMethods.
+
+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.
@@ -284,7 +284,7 @@ public ICollection GetCompatibleMethods (ParameterInfo[] parameters)
if (klass != null) {
foreach (INode child in fileParser.CompilationUnit.Children) {
MethodDeclaration methodDeclaration = child as MethodDeclaration;
- if (methodDeclaration.Parameters.Count == parameters.Length) {
+ if (methodDeclaration != null && methodDeclaration.Parameters.Count == parameters.Length) {
bool match = false;
for (int i=0; i < methodDeclaration.Parameters.Count; i++) {
if (methodDeclaration.Parameters[i].TypeReference.Type != parameters[i].ParameterType.Name)

0 comments on commit 8358270

Please sign in to comment.