aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDan Lake2012-02-02 18:06:34 -0800
committerDan Lake2012-02-02 18:06:34 -0800
commited846f11f17b7497c9a0bcf599fcb6431504c18e (patch)
treeaf5e5751c5537cb8a175ea528638f0b1ff865dcc
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-ed846f11f17b7497c9a0bcf599fcb6431504c18e.zip
opensim-SC_OLD-ed846f11f17b7497c9a0bcf599fcb6431504c18e.tar.gz
opensim-SC_OLD-ed846f11f17b7497c9a0bcf599fcb6431504c18e.tar.bz2
opensim-SC_OLD-ed846f11f17b7497c9a0bcf599fcb6431504c18e.tar.xz
OpenSim tests do not always create an EventManager so calls to trigger events during tests must check for null EventManager
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index 9b660b6..9fb11d3 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2729,7 +2729,9 @@ namespace OpenSim.Region.Framework.Scenes
2729 if (ParentGroup == null) 2729 if (ParentGroup == null)
2730 return; 2730 return;
2731 2731
2732 ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); 2732 // When running OpenSim tests, EventManager can be null. Maybe tests should create an EventManager.
2733 if(ParentGroup.Scene.EventManager != null)
2734 ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this);
2733 2735
2734 ParentGroup.QueueForUpdateCheck(); 2736 ParentGroup.QueueForUpdateCheck();
2735 2737
@@ -2763,7 +2765,9 @@ namespace OpenSim.Region.Framework.Scenes
2763 if (ParentGroup == null) 2765 if (ParentGroup == null)
2764 return; 2766 return;
2765 2767
2766 ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this); 2768 // When running OpenSim tests, EventManager can be null. Maybe tests should create an EventManager.
2769 if (ParentGroup.Scene.EventManager != null)
2770 ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this);
2767 2771
2768 // This was pulled from SceneViewer. Attachments always receive full updates. 2772 // This was pulled from SceneViewer. Attachments always receive full updates.
2769 // I could not verify if this is a requirement but this maintains existing behavior 2773 // I could not verify if this is a requirement but this maintains existing behavior