diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs index 1e732146f3..03bde7e635 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs @@ -424,6 +424,12 @@ namespace OpenSim.Framework.Data.MSSQL /// The inventory item public void addInventoryItem(InventoryItemBase item) { + if (getInventoryItem(item.inventoryID) != null) + { + updateInventoryItem(item); + return; + } + string sql = "INSERT INTO inventoryitems"; sql += "([inventoryID], [assetID], [assetType], [parentFolderID], [avatarID], [inventoryName], [inventoryDescription], [inventoryNextPermissions], [inventoryCurrentPermissions], [invType], [creatorID], [inventoryBasePermissions], [inventoryEveryOnePermissions]) VALUES ";