Browse Source

Add extra null check to workaround an issue

svn path=/trunk/mcs/; revision=73539
Konstantin Triger 19 years ago
parent
commit
c34e2d7c8c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      mcs/class/System.Web/System.Web.UI/TemplateControl.jvm.cs

+ 1 - 1
mcs/class/System.Web/System.Web.UI/TemplateControl.jvm.cs

@@ -165,7 +165,7 @@ namespace System.Web.UI {
 			foreach (string methodName in methodNames) {
 				MethodInfo method = null;
 				Type type;
-				for (type = GetType (); type.Assembly != _System_Web_Assembly; type = type.BaseType) {
+				for (type = GetType (); type != null && type.Assembly != _System_Web_Assembly; type = type.BaseType) {
 					method = type.GetMethod (methodName, bflags);
 					if (method != null)
 						break;