potencial null ref

LSLKeyTest
UbitUmarov 2016-08-24 02:00:50 +01:00
parent 3c30223c77
commit fdea8fc96b
1 changed files with 37 additions and 41 deletions

View File

@ -261,11 +261,16 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
{
InventoryItemBase item = m_Scene.InventoryService.GetItem(remoteClient.AgentId, itemID);
if (item == null)
{
m_log.ErrorFormat(
"[INVENTORY ACCESS MODULE]: Could not find item {0} for caps inventory update", itemID);
return UUID.Zero;
}
if (item.Owner != remoteClient.AgentId)
return UUID.Zero;
if (item != null)
{
if ((InventoryType)item.InvType == InventoryType.Notecard)
{
if (!m_Scene.Permissions.CanEditNotecard(itemID, UUID.Zero, remoteClient.AgentId))
@ -311,15 +316,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
// remoteClient.SendInventoryItemCreateUpdate(item);
return (asset.FullID);
}
else
{
m_log.ErrorFormat(
"[INVENTORY ACCESS MODULE]: Could not find item {0} for caps inventory update",
itemID);
}
return UUID.Zero;
}
public virtual bool UpdateInventoryItemAsset(UUID ownerID, InventoryItemBase item, AssetBase asset)
{