From 495cf040be86afbfbdb16f2a4b0dcc369984ab61 Mon Sep 17 00:00:00 2001 From: MW Date: Sat, 1 Dec 2007 15:20:49 +0000 Subject: Attempted fix for mantis issue# 66 --- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Environment') diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 5b6b9cb..a2fd01f 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -167,14 +167,23 @@ namespace OpenSim.Region.Environment.Scenes return; } - item = userInfo.RootFolder.HasItem(oldItemID); - if (item == null) + if (userInfo.RootFolder != null) + { + item = userInfo.RootFolder.HasItem(oldItemID); + if (item == null) + { + MainLog.Instance.Warn("INVENTORY", "Failed to find item " + oldItemID.ToString()); + return; + } + } + else { MainLog.Instance.Warn("INVENTORY", "Failed to find item " + oldItemID.ToString()); return; } } + AssetBase asset = AssetCache.CopyAsset(item.assetID); if (asset == null) { -- cgit v1.1