Guard HGAssetService against uninitialized variables and null arguments.

remove-scene-viewer
Diva Canto 2011-10-15 20:23:26 -07:00
parent b9930a6305
commit bbd0e68c06
1 changed files with 3 additions and 0 deletions

View File

@ -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;