From bbd0e68c06b79acf0781d78e81fa292f549d676b Mon Sep 17 00:00:00 2001
From: Diva Canto
Date: Sat, 15 Oct 2011 20:23:26 -0700
Subject: Guard HGAssetService against uninitialized variables and null
 arguments.

---
 OpenSim/Services/HypergridService/HGAssetService.cs | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'OpenSim/Services/HypergridService/HGAssetService.cs')

diff --git a/OpenSim/Services/HypergridService/HGAssetService.cs b/OpenSim/Services/HypergridService/HGAssetService.cs
index a82d0d1..e518329 100644
--- a/OpenSim/Services/HypergridService/HGAssetService.cs
+++ b/OpenSim/Services/HypergridService/HGAssetService.cs
@@ -129,6 +129,9 @@ namespace OpenSim.Services.HypergridService
 
         protected void AdjustIdentifiers(AssetMetadata meta)
         {
+            if (meta == null || m_Cache == null)
+                return;
+
             UserAccount creator = m_Cache.GetUser(meta.CreatorID);
             if (creator != null)
                 meta.CreatorID = m_ProfileServiceURL + "/" + meta.CreatorID + ";" + creator.FirstName + " " + creator.LastName;
-- 
cgit v1.1