avoid a null ref

melanie
UbitUmarov 2016-12-14 03:02:57 +00:00
parent 1ffc81c869
commit 364d58635b
1 changed files with 5 additions and 1 deletions

View File

@ -268,8 +268,12 @@ namespace OpenSim.Region.DataSnapshot.Providers
{
XmlNode username = nodeFactory.CreateNode(XmlNodeType.Element, "name", "");
UserAccount account = m_scene.UserAccountService.GetUserAccount(m_scene.RegionInfo.ScopeID, userOwnerUUID);
if(account != null)
username.InnerText = account.FirstName + " " + account.LastName;
else
username.InnerText = "UnKnown";
userblock.AppendChild(username);
}
catch (Exception)
{