mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
do set a default script of not provided; minor safeguard
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user