From 91ac21b9ec36d698bfaa7ecf6e8d981562ddb4c1 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Thu, 26 Jan 2012 17:00:58 -0800 Subject: HG Inventoty: Guard against items not found. --- OpenSim/Services/HypergridService/HGInventoryService.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'OpenSim/Services') diff --git a/OpenSim/Services/HypergridService/HGInventoryService.cs b/OpenSim/Services/HypergridService/HGInventoryService.cs index daf8c3a..41d5a7a 100644 --- a/OpenSim/Services/HypergridService/HGInventoryService.cs +++ b/OpenSim/Services/HypergridService/HGInventoryService.cs @@ -319,13 +319,14 @@ namespace OpenSim.Services.HypergridService public override InventoryItemBase GetItem(InventoryItemBase item) { InventoryItemBase it = base.GetItem(item); + if (it != null) + { + UserAccount user = m_Cache.GetUser(it.CreatorId); - UserAccount user = m_Cache.GetUser(it.CreatorId); - - // Adjust the creator data - if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty)) - it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName; - + // Adjust the creator data + if (user != null && it != null && (it.CreatorData == null || it.CreatorData == string.Empty)) + it.CreatorData = m_HomeURL + ";" + user.FirstName + " " + user.LastName; + } return it; } -- cgit v1.1