cinderblocks / libremetaverse

An fork of the libopenmetaverse library striving for performance improvements and up-to-date compatibility with SL/OS/Halcyon
BSD 3-Clause "New" or "Revised" License
61 stars 40 forks source link

NullReferenceException in InventoryManager when passing Folder with Descendants #5

Closed zontreck closed 4 years ago

zontreck commented 4 years ago

On line 2523, a null reference exception is thrown

2521             for (int i = 1; i <= folderContents.Count; ++i)
2522             {
2523                bucket[i * 17] = (byte)folderContents[i - 1].AssetType;
2524                Buffer.BlockCopy(folderContents[i - 1].UUID.GetBytes(), 0, bucket, i * 17 + 1, 16);
2525             }

The array objects inside folderContents are set to null. It appears that it allocated enough array space for the items as the folder I tested this on had 2 subfolders.

Client.Inventory.GiveFolder(UUID folderID, string folderName, AssetType, UUID recipient, bool doEffect);
cinderblocks commented 4 years ago

Resolved in 1.4.3