null check, not everyone runs with a group module

This commit is contained in:
lickx
2024-12-09 13:38:18 +01:00
parent 1cd2361936
commit 08e5fa095d

View File

@@ -1699,8 +1699,13 @@ namespace OpenSim.Region.CoreModules.World.Land
string LastOwnerName;
if (land.LandData.IsGroupOwned)
{
GroupRecord groupRecord = m_groupManager.GetGroupRecord(land.LandData.OwnerID);
LastOwnerName = "group " + groupRecord.GroupName;
if (m_groupManager is not null)
{
GroupRecord groupRecord = m_groupManager.GetGroupRecord(land.LandData.OwnerID);
LastOwnerName = "group " + groupRecord.GroupName;
}
else
LastOwnerName = "a group";
}
else
LastOwnerName = m_userManager.GetUserName(land.LandData.OwnerID);