Minor improvement over the previous commit -- make sure the code exists in the FolderType enum

LSLKeyTest
Diva Canto 2016-05-16 21:57:19 -07:00
parent 9e21647011
commit 057d1b2a6e
1 changed files with 1 additions and 1 deletions

View File

@ -187,7 +187,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
InventoryFolderBase f = new InventoryFolderBase(folderID, remoteClient.AgentId); InventoryFolderBase f = new InventoryFolderBase(folderID, remoteClient.AgentId);
InventoryFolderBase folder = m_Scene.InventoryService.GetFolder(f); InventoryFolderBase folder = m_Scene.InventoryService.GetFolder(f);
if (folder == null) if (folder == null && Enum.IsDefined(typeof(FolderType), (sbyte)invType))
{ {
folder = m_Scene.InventoryService.GetFolderForType(remoteClient.AgentId, (FolderType)invType); folder = m_Scene.InventoryService.GetFolderForType(remoteClient.AgentId, (FolderType)invType);
if (folder != null) if (folder != null)