Added checks for null circuit data in AddNewClient2. In the case of RegionSyncAvatars being added to the scene, there will be no circuit data, no appearance data, and no teleport flags.

dsg
Dan Lake 2011-01-31 14:32:34 -08:00
parent e709b55f01
commit a7d4c974dd
1 changed files with 3 additions and 2 deletions

View File

@ -3036,11 +3036,12 @@ namespace OpenSim.Region.Framework.Scenes
m_clientManager.Add(client);
SubscribeToClientEvents(client);
ScenePresence sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit.Appearance);
ScenePresence sp = m_sceneGraph.CreateAndAddChildScenePresence(client, aCircuit == null ? null : aCircuit.Appearance);
m_eventManager.TriggerOnNewPresence(sp);
//presence.initializeScenePresence(client, RegionInfo, this);
sp.TeleportFlags = (TeleportFlags)aCircuit.teleportFlags;
if(aCircuit != null)
sp.TeleportFlags = (TeleportFlags)aCircuit.teleportFlags;
// HERE!!! Do the initial attachments right here
// first agent upon login is a root agent by design.