* Handle null check on configs in module startup so that the the code can be run on 'stop on handled and unhandled null reference exceptions' mode without pausing during startup a bunch of times. I don't think exceptions were really meant for replacing a single if statement...
parent
c22276a169
commit
71862f34b6
|
@ -57,7 +57,7 @@ namespace OpenSim.Region.CoreModules.Framework.Statistics.Logging
|
|||
try
|
||||
{
|
||||
IConfig statConfig = source.Configs["Statistics.Binary"];
|
||||
if (statConfig.Contains("enabled") && statConfig.GetBoolean("enabled"))
|
||||
if (statConfig != null && statConfig.Contains("enabled") && statConfig.GetBoolean("enabled"))
|
||||
{
|
||||
if (statConfig.Contains("collect_region_stats"))
|
||||
{
|
||||
|
|
|
@ -111,7 +111,8 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
m_rpcPending = new Dictionary<UUID, RPCRequestInfo>();
|
||||
m_rpcPendingResponses = new Dictionary<UUID, RPCRequestInfo>();
|
||||
m_pendingSRDResponses = new Dictionary<UUID, SendRemoteDataRequest>();
|
||||
|
||||
if (config.Configs["XMLRPC"] != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
m_remoteDataPort = config.Configs["XMLRPC"].GetInt("XmlRpcPort", m_remoteDataPort);
|
||||
|
@ -120,6 +121,7 @@ namespace OpenSim.Region.CoreModules.Scripting.XMLRPC
|
|||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue