Browse Source

2008-12-11 Marek Habersack <[email protected]>

	* MasterPageParser.cs: check if masterType is null before using it
	in AddDirective.

svn path=/trunk/mcs/; revision=121287
Marek Habersack 17 years ago
parent
commit
c3abcb4e51

+ 3 - 0
mcs/class/System.Web/System.Web.UI/ChangeLog

@@ -1,5 +1,8 @@
 2008-12-11  Marek Habersack  <[email protected]>
 
+	* MasterPageParser.cs: check if masterType is null before using it
+	in AddDirective.
+
 	* TemplateParser.cs: in the 2.0 profile when a custom control is
 	registered, do not compile it right away but store the tag name in
 	a registry to be compiled at a later stage.

+ 2 - 1
mcs/class/System.Web/System.Web.UI/MasterPageParser.cs

@@ -106,7 +106,8 @@ namespace System.Web.UI
 					} else
 						ThrowParseException ("The MasterType directive must have either a TypeName or a VirtualPath attribute.");
 				}
-				AddAssembly (masterType.Assembly, true);
+				if (masterType != null)
+					AddAssembly (masterType.Assembly, true);
 			}
 			else
 				base.AddDirective (directive, atts);