do set a default script of not provided; minor safeguard

This commit is contained in:
UbitUmarov
2021-11-03 01:49:26 +00:00
parent f542026282
commit 2e8ec93386

View File

@@ -161,6 +161,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
#endregion
private readonly byte[] DEFAULTSCRIPT = osUTF8.GetASCIIBytes("default\n{\n state_entry()\n {\n llSay(0, \"Script running\");\n }\n}");
#region Inventory Access
/// <summary>
@@ -254,6 +255,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
return;
}
}
else if( assetType == (byte)AssetType.LSLText)
{
if(data == null)
data = DEFAULTSCRIPT;
}
else if( assetType == (byte)AssetType.Clothing ||
assetType == (byte)AssetType.Bodypart)
flags = subType;