From c35f8b3f1b8f896af8f04e199eddf96132887ed4 Mon Sep 17 00:00:00 2001 From: Christopher Date: Sun, 28 Jun 2020 13:58:12 +0200 Subject: [PATCH] dont work on null uuid textures --- src/TextureFetcher.cs | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/TextureFetcher.cs b/src/TextureFetcher.cs index 4a9fd74..f9acede 100644 --- a/src/TextureFetcher.cs +++ b/src/TextureFetcher.cs @@ -121,16 +121,20 @@ namespace OpenSim.Modules.TextureFetcher //Convert texture uuid list to inventar items. foreach (UUID texture in allTextures) { - TaskInventoryItem item = new TaskInventoryItem(); - item.AssetID = texture; - item.OwnerID = part.OwnerID; - item.CurrentPermissions = 581639; - item.Name = "tf-" + texture.ToString(); - item.Description = "This item was generated by the texture fetcher module."; - item.OwnerID = part.OwnerID; - item.CreatorID = part.OwnerID; - item.LastOwnerID = part.OwnerID; - inventoryItems.Add(item); + if (texture != UUID.Zero) + { + TaskInventoryItem item = new TaskInventoryItem(); + item.AssetID = texture; + item.ItemID = UUID.Random(); + item.OwnerID = part.OwnerID; + item.CurrentPermissions = 581639; + item.Name = "tf-" + texture.ToString(); + item.Description = "This item was generated by the texture fetcher module."; + item.OwnerID = part.OwnerID; + item.CreatorID = part.OwnerID; + item.LastOwnerID = part.OwnerID; + inventoryItems.Add(item); + } } //Check if the item is allready in the inventory and then add it.