mirror of
https://github.com/opensim/opensim.git
synced 2026-08-12 04:05:42 +08:00
add some null refs checks on script removal
This commit is contained in:
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
for (int i = 0; i < parts.Length; i++)
|
||||
parts[i].Inventory.RemoveScriptInstances(sceneObjectBeingDeleted);
|
||||
parts[i]?.Inventory?.RemoveScriptInstances(sceneObjectBeingDeleted);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -101,7 +101,7 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
SceneObjectPart[] parts = m_parts.GetArray();
|
||||
for(int i = 0; i < parts.Length; ++i)
|
||||
parts[i].Inventory.StopScriptInstances();
|
||||
parts[i]?.Inventory?.StopScriptInstances();
|
||||
}
|
||||
|
||||
public void SendReleaseScriptsControl()
|
||||
|
||||
Reference in New Issue
Block a user