aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorUbitUmarov2016-08-24 02:10:34 +0100
committerUbitUmarov2016-08-24 02:10:34 +0100
commitf9f35e504973da9610ffcb09502a4ae32ea8eec3 (patch)
tree2e838266f7dc5a7da7bd85276044811fe929a4a2 /OpenSim/Region/ScriptEngine
parentpotencial null ref (diff)
downloadopensim-SC_OLD-f9f35e504973da9610ffcb09502a4ae32ea8eec3.zip
opensim-SC_OLD-f9f35e504973da9610ffcb09502a4ae32ea8eec3.tar.gz
opensim-SC_OLD-f9f35e504973da9610ffcb09502a4ae32ea8eec3.tar.bz2
opensim-SC_OLD-f9f35e504973da9610ffcb09502a4ae32ea8eec3.tar.xz
potencial null ref
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 3241598..f45676e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4323,6 +4323,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4323 return; 4323 return;
4324 4324
4325 SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)targetID); 4325 SceneObjectPart targetPart = World.GetSceneObjectPart((UUID)targetID);
4326 if (targetPart == null)
4327 return;
4326 4328
4327 if (targetPart.ParentGroup.AttachmentPoint != 0) 4329 if (targetPart.ParentGroup.AttachmentPoint != 0)
4328 return; // Fail silently if attached 4330 return; // Fail silently if attached
@@ -4332,24 +4334,22 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4332 4334
4333 SceneObjectGroup parentPrim = null, childPrim = null; 4335 SceneObjectGroup parentPrim = null, childPrim = null;
4334 4336
4335 if (targetPart != null) 4337 if (parent != 0)
4336 { 4338 {
4337 if (parent != 0) 4339 parentPrim = m_host.ParentGroup;
4338 { 4340 childPrim = targetPart.ParentGroup;
4339 parentPrim = m_host.ParentGroup; 4341 }
4340 childPrim = targetPart.ParentGroup; 4342 else
4341 } 4343 {
4342 else 4344 parentPrim = targetPart.ParentGroup;
4343 { 4345 childPrim = m_host.ParentGroup;
4344 parentPrim = targetPart.ParentGroup;
4345 childPrim = m_host.ParentGroup;
4346 }
4347
4348 // Required for linking
4349 childPrim.RootPart.ClearUpdateSchedule();
4350 parentPrim.LinkToGroup(childPrim, true);
4351 } 4346 }
4352 4347
4348 // Required for linking
4349 childPrim.RootPart.ClearUpdateSchedule();
4350 parentPrim.LinkToGroup(childPrim, true);
4351
4352
4353 parentPrim.TriggerScriptChangedEvent(Changed.LINK); 4353 parentPrim.TriggerScriptChangedEvent(Changed.LINK);
4354 parentPrim.RootPart.CreateSelected = true; 4354 parentPrim.RootPart.CreateSelected = true;
4355 parentPrim.HasGroupChanged = true; 4355 parentPrim.HasGroupChanged = true;