From: <blo...@us...> - 2006-03-22 20:22:45
|
Revision: 890 Author: blowdart Date: 2006-03-22 12:22:38 -0800 (Wed, 22 Mar 2006) ViewCVS: http://svn.sourceforge.net/subtext/?rev=890&view=rev Log Message: ----------- Added null checking around control property setting Modified Paths: -------------- trunk/SubtextSolution/Subtext.Web/UI/Controls/Header.cs Modified: trunk/SubtextSolution/Subtext.Web/UI/Controls/Header.cs =================================================================== --- trunk/SubtextSolution/Subtext.Web/UI/Controls/Header.cs 2006-03-16 18:42:02 UTC (rev 889) +++ trunk/SubtextSolution/Subtext.Web/UI/Controls/Header.cs 2006-03-22 20:22:38 UTC (rev 890) @@ -32,9 +32,14 @@ { base.OnLoad (e); - HeaderTitle.NavigateUrl = CurrentBlog.BlogHomeUrl; - HeaderTitle.Text = CurrentBlog.Title; - HeaderSubTitle.Text = CurrentBlog.SubTitle; + if (null != this.FindControl("HeaderTitle")) + { + HeaderTitle.NavigateUrl = CurrentBlog.BlogHomeUrl; + HeaderTitle.Text = CurrentBlog.Title; + } + + if (null != this.FindControl("HeaderSubTitle")) + HeaderSubTitle.Text = CurrentBlog.SubTitle; } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |