mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
Put guards on a bunch of exception-inducing code, as seen in logs from load test.
This commit is contained in:
@@ -3687,7 +3687,9 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
"[SCENE]: Existing root scene presence detected for {0} {1} in {2} when connecting. Removing existing presence.",
|
||||
sp.Name, sp.UUID, RegionInfo.RegionName);
|
||||
|
||||
sp.ControllingClient.Close(true);
|
||||
if (sp.ControllingClient != null)
|
||||
sp.ControllingClient.Close(true);
|
||||
|
||||
sp = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -67,6 +67,12 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
{
|
||||
int scriptsStarted = 0;
|
||||
|
||||
if (m_scene == null)
|
||||
{
|
||||
m_log.DebugFormat("[PRIM INVENTORY]: m_scene is null. Unable to create script instances");
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Don't start scripts if they're turned off in the region!
|
||||
if (!m_scene.RegionInfo.RegionSettings.DisableScripts)
|
||||
{
|
||||
|
||||
@@ -553,7 +553,8 @@ namespace OpenSim.Region.Framework.Scenes
|
||||
/// </param>
|
||||
public void StopScriptInstance(TaskInventoryItem item)
|
||||
{
|
||||
m_part.ParentGroup.Scene.EventManager.TriggerStopScript(m_part.LocalId, item.ItemID);
|
||||
if (m_part.ParentGroup.Scene != null)
|
||||
m_part.ParentGroup.Scene.EventManager.TriggerStopScript(m_part.LocalId, item.ItemID);
|
||||
|
||||
// At the moment, even stopped scripts are counted as active, which is probably wrong.
|
||||
// m_part.ParentGroup.AddActiveScriptCount(-1);
|
||||
|
||||
Reference in New Issue
Block a user