Fixed unit tests for Load OAR

This commit is contained in:
Oren Hurvitz
2021-03-18 12:41:43 +02:00
parent 73619763b9
commit 4445bc1222
2 changed files with 18 additions and 2 deletions

View File

@@ -1104,7 +1104,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
currentRegionSettings.CacheID = UUID.Random();
currentRegionSettings.Save();
scene.EstateDataService.StoreEstateSettings(scene.RegionInfo.EstateSettings);
scene.EstateDataServiceSafe?.StoreEstateSettings(scene.RegionInfo.EstateSettings);
IEstateModule estateModule = scene.RequestModuleInterface<IEstateModule>();
if (estateModule != null)

View File

@@ -556,7 +556,7 @@ namespace OpenSim.Region.Framework.Scenes
{
if (m_EstateDataService == null)
{
m_EstateDataService = RequestModuleInterface<IEstateDataService>();
m_EstateDataService = EstateDataServiceSafe;
if (m_EstateDataService == null)
{
@@ -568,6 +568,22 @@ namespace OpenSim.Region.Framework.Scenes
}
}
/// <summary>
/// Similar to 'EstateDataService', but if the service isn't found returns null instead of throwing an exception.
/// </summary>
public IEstateDataService EstateDataServiceSafe
{
get
{
if (m_EstateDataService == null)
{
m_EstateDataService = RequestModuleInterface<IEstateDataService>();
}
return m_EstateDataService;
}
}
public IAssetService AssetService
{
get