Another temporary fix for trees being unavailable after install, the context is null during upgrades in the installer, so would cause a YSOD

This commit is contained in:
Sebastiaan Janssen
2012-11-23 08:02:23 -01:00
parent 4195754b0c
commit 654c3b7403
2 changed files with 2 additions and 2 deletions

View File

@@ -32,7 +32,7 @@ namespace umbraco.presentation.install.steps
if (!cms.businesslogic.skinning.Skinning.IsStarterKitInstalled())
customizeSite.Visible = false;
var initTrees = new ApplicationTreeRegistrar();
new ApplicationTreeRegistrar();
}
#region Web Form Designer generated code

View File

@@ -31,7 +31,7 @@ namespace umbraco.BusinessLogic
public ApplicationTreeRegistrar()
{
//don't do anything if the application is not configured!
if (!ApplicationContext.Current.IsConfigured)
if (ApplicationContext.Current == null || !ApplicationContext.Current.IsConfigured)
return;
// Load all Trees by attribute and add them to the XML config