* Fix a null reference when there's no [Economy] section in the opensim.ini

0.6.0-stable
Teravus Ovares 2008-04-10 13:05:01 +00:00
parent 9fec575b3e
commit b92c6901ad
1 changed files with 3 additions and 3 deletions

View File

@ -115,14 +115,14 @@ namespace OpenSim.Region.Environment.Modules
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string config) private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string config)
{ {
if (config == "Startup") if (config == "Startup" && startupConfig != null)
{ {
gridmode = startupConfig.GetBoolean("gridmode", false); gridmode = startupConfig.GetBoolean("gridmode", false);
m_enabled = (startupConfig.GetString("economymodule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule"); m_enabled = (startupConfig.GetString("economymodule", "BetaGridLikeMoneyModule") == "BetaGridLikeMoneyModule");
} }
if (config == "Economy") if (config == "Economy" && startupConfig != null)
{ {
ObjectCapacity = startupConfig.GetInt("ObjectCapacity", 45000); ObjectCapacity = startupConfig.GetInt("ObjectCapacity", 45000);
PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100); PriceEnergyUnit = startupConfig.GetInt("PriceEnergyUnit", 100);
PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10); PriceObjectClaim = startupConfig.GetInt("PriceObjectClaim", 10);