diff options
author | Melanie | 2013-01-23 16:11:37 +0100 |
---|---|---|
committer | Melanie | 2013-01-23 16:11:37 +0100 |
commit | f667428283654f4fbe34ddf4cabaa1b991098258 (patch) | |
tree | 6d046d7d7666d4088583f27aac90869edb46d53e /OpenSim/Region/ScriptEngine/Shared | |
parent | * A better way to handle the last fix (This is in case the viewer provides a ... (diff) | |
download | opensim-SC-f667428283654f4fbe34ddf4cabaa1b991098258.zip opensim-SC-f667428283654f4fbe34ddf4cabaa1b991098258.tar.gz opensim-SC-f667428283654f4fbe34ddf4cabaa1b991098258.tar.bz2 opensim-SC-f667428283654f4fbe34ddf4cabaa1b991098258.tar.xz |
Guard against XMLRPC module ref being null, which will happen if it's disabled
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index fcb68b2..58c2ac5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -7322,7 +7322,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7322 | { | 7322 | { |
7323 | m_host.AddScriptLPS(1); | 7323 | m_host.AddScriptLPS(1); |
7324 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7324 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
7325 | if (xmlrpcMod.IsEnabled()) | 7325 | if (xmlrpcMod != null && xmlrpcMod.IsEnabled()) |
7326 | { | 7326 | { |
7327 | UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero); | 7327 | UUID channelID = xmlrpcMod.OpenXMLRPCChannel(m_host.LocalId, m_item.ItemID, UUID.Zero); |
7328 | IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); | 7328 | IXmlRpcRouter xmlRpcRouter = m_ScriptEngine.World.RequestModuleInterface<IXmlRpcRouter>(); |
@@ -7354,6 +7354,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7354 | m_host.AddScriptLPS(1); | 7354 | m_host.AddScriptLPS(1); |
7355 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7355 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
7356 | ScriptSleep(3000); | 7356 | ScriptSleep(3000); |
7357 | if (xmlrpcMod == null) | ||
7358 | return ""; | ||
7357 | return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); | 7359 | return (xmlrpcMod.SendRemoteData(m_host.LocalId, m_item.ItemID, channel, dest, idata, sdata)).ToString(); |
7358 | } | 7360 | } |
7359 | 7361 | ||
@@ -7361,7 +7363,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7361 | { | 7363 | { |
7362 | m_host.AddScriptLPS(1); | 7364 | m_host.AddScriptLPS(1); |
7363 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7365 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
7364 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); | 7366 | if (xmlrpcMod != null) |
7367 | xmlrpcMod.RemoteDataReply(channel, message_id, sdata, idata); | ||
7365 | ScriptSleep(3000); | 7368 | ScriptSleep(3000); |
7366 | } | 7369 | } |
7367 | 7370 | ||
@@ -7369,7 +7372,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7369 | { | 7372 | { |
7370 | m_host.AddScriptLPS(1); | 7373 | m_host.AddScriptLPS(1); |
7371 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); | 7374 | IXMLRPC xmlrpcMod = m_ScriptEngine.World.RequestModuleInterface<IXMLRPC>(); |
7372 | xmlrpcMod.CloseXMLRPCChannel((UUID)channel); | 7375 | if (xmlrpcMod != null) |
7376 | xmlrpcMod.CloseXMLRPCChannel((UUID)channel); | ||
7373 | ScriptSleep(1000); | 7377 | ScriptSleep(1000); |
7374 | } | 7378 | } |
7375 | 7379 | ||