Guard against XMLRPC module ref being null, which will happen if it's disabled
parent
be60c0b010
commit
f667428283
|
@ -7322,7 +7322,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
||||||
if (xmlrpcMod.IsEnabled())
|
if (xmlrpcMod != null && xmlrpcMod.IsEnabled())
|
||||||
{
|
{
|
||||||
UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero);
|
UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero);
|
||||||
IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>();
|
IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>();
|
||||||
|
@ -7354,6 +7354,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
||||||
ScriptSleep(3000);
|
ScriptSleep(3000);
|
||||||
|
if (xmlrpcMod == null)
|
||||||
|
return "";
|
||||||
return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString();
|
return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7361,6 +7363,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
||||||
|
if (xmlrpcMod != null)
|
||||||
xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata);
|
xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata);
|
||||||
ScriptSleep(3000);
|
ScriptSleep(3000);
|
||||||
}
|
}
|
||||||
|
@ -7369,6 +7372,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>();
|
||||||
|
if (xmlrpcMod != null)
|
||||||
xmlrpcMod.CloseXMLRPCChannel((UUID)channel);
|
xmlrpcMod.CloseXMLRPCChannel((UUID)channel);
|
||||||
ScriptSleep(1000);
|
ScriptSleep(1000);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue