add patch
parent
90b1117f79
commit
9ae2c63dc5
|
@ -0,0 +1,37 @@
|
||||||
|
From b7314cbd4f13f1c7bf86b4e05b20a0a12759124b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christopher <christopher@clatza.dev>
|
||||||
|
Date: Tue, 16 Nov 2021 22:47:01 +0100
|
||||||
|
Subject: [PATCH] add some null checks
|
||||||
|
|
||||||
|
---
|
||||||
|
.../Region/Framework/Scenes/SceneObjectPartInventory.cs | 9 +++++++++
|
||||||
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
|
||||||
|
index d91f84afe1..9fe7fb66dc 100644
|
||||||
|
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
|
||||||
|
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
|
||||||
|
@@ -746,11 +746,20 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
|
/// </param>
|
||||||
|
public void RemoveScriptInstance(UUID itemId, bool sceneObjectBeingDeleted)
|
||||||
|
{
|
||||||
|
+ if (m_items == null)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
if (m_items.ContainsKey(itemId))
|
||||||
|
{
|
||||||
|
if (!sceneObjectBeingDeleted)
|
||||||
|
m_part.RemoveScriptEvents(itemId);
|
||||||
|
|
||||||
|
+ if (m_part == null)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
+ if (m_part.ParentGroup == null)
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
m_part.ParentGroup.Scene.EventManager.TriggerRemoveScript(m_part.LocalId, itemId);
|
||||||
|
m_part.ParentGroup.AddActiveScriptCount(-1);
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.30.1.windows.1
|
||||||
|
|
Loading…
Reference in New Issue