aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 3654106..4137397 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -1664,9 +1664,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
1664 CheckThreatLevel(ThreatLevel.Low, "osMessageObject"); 1664 CheckThreatLevel(ThreatLevel.Low, "osMessageObject");
1665 m_host.AddScriptLPS(1); 1665 m_host.AddScriptLPS(1);
1666 1666
1667 UUID objUUID;
1668 if (!UUID.TryParse(objectUUID, out objUUID)) // prior to patching, a thrown exception regarding invalid GUID format would be shouted instead.
1669 {
1670 OSSLShoutError("osMessageObject() cannot send messages to objects with invalid UUIDs");
1671 return;
1672 }
1673
1667 object[] resobj = new object[] { new LSL_Types.LSLString(m_host.UUID.ToString()), new LSL_Types.LSLString(message) }; 1674 object[] resobj = new object[] { new LSL_Types.LSLString(m_host.UUID.ToString()), new LSL_Types.LSLString(message) };
1668 1675
1669 SceneObjectPart sceneOP = World.GetSceneObjectPart(new UUID(objectUUID)); 1676 SceneObjectPart sceneOP = World.GetSceneObjectPart(objUUID);
1677
1678 if (sceneOP == null) // prior to patching, PostObjectEvent() would cause a throw exception to be shouted instead.
1679 {
1680 OSSLShoutError("osMessageObject() cannot send message to " + objUUID.ToString() + ", object was not found in scene.");
1681 return;
1682 }
1670 1683
1671 m_ScriptEngine.PostObjectEvent( 1684 m_ScriptEngine.PostObjectEvent(
1672 sceneOP.LocalId, new EventParams( 1685 sceneOP.LocalId, new EventParams(