From 795b56e695976575eacfd5505830a94f32ca2d28 Mon Sep 17 00:00:00 2001 From: Makopoppo Date: Sat, 27 Aug 2011 12:16:46 +0900 Subject: Related to #4689 - Adding missing null check for SceneObjectPart Signed-off-by: BlueWall --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 9358e7b..addc20c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -223,6 +223,8 @@ namespace OpenSim.Region.Framework.Scenes // Retrieve group SceneObjectPart part = GetSceneObjectPart(primId); + if (part == null) + return new ArrayList(); SceneObjectGroup group = part.ParentGroup; if (null == group) { @@ -967,6 +969,8 @@ namespace OpenSim.Region.Framework.Scenes public void RemoveTaskInventory(IClientAPI remoteClient, UUID itemID, uint localID) { SceneObjectPart part = GetSceneObjectPart(localID); + if (part == null) + return; SceneObjectGroup group = part.ParentGroup; if (group != null) { @@ -2028,6 +2032,8 @@ namespace OpenSim.Region.Framework.Scenes foreach (uint localID in localIDs) { SceneObjectPart part = GetSceneObjectPart(localID); + if (part == null) + continue; if (!groups.Contains(part.ParentGroup)) groups.Add(part.ParentGroup); } @@ -2073,6 +2079,8 @@ namespace OpenSim.Region.Framework.Scenes foreach (uint localID in localIDs) { SceneObjectPart part = GetSceneObjectPart(localID); + if (part == null) + continue; part.GetProperties(remoteClient); } } -- cgit v1.1