OpenSim tests do not always create an EventManager so calls to trigger events during tests must check for null EventManager

iar_mods
Dan Lake 2012-02-02 18:06:34 -08:00
parent 3257dbe76d
commit ed846f11f1
1 changed files with 6 additions and 2 deletions

View File

@ -2729,7 +2729,9 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null)
return;
ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this);
// When running OpenSim tests, EventManager can be null. Maybe tests should create an EventManager.
if(ParentGroup.Scene.EventManager != null)
ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this);
ParentGroup.QueueForUpdateCheck();
@ -2763,7 +2765,9 @@ namespace OpenSim.Region.Framework.Scenes
if (ParentGroup == null)
return;
ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this);
// When running OpenSim tests, EventManager can be null. Maybe tests should create an EventManager.
if (ParentGroup.Scene.EventManager != null)
ParentGroup.Scene.EventManager.TriggerSceneObjectPartUpdated(this);
// This was pulled from SceneViewer. Attachments always receive full updates.
// I could not verify if this is a requirement but this maintains existing behavior