fix crash in standalone mode for initial appearance setup

This commit is contained in:
Sean Dague
2008-05-19 20:33:54 +00:00
parent 01b5425a2d
commit 7a52b35c57
3 changed files with 16 additions and 7 deletions

View File

@@ -1549,6 +1549,14 @@ namespace OpenSim.Region.Environment.Scenes
presence = m_restorePresences[client.AgentId];
m_restorePresences.Remove(client.AgentId);
// This is one of two paths to create avatars that are
// used. This tends to get called more in standalone
// than grid, not really sure why, but as such needs
// an explicity appearance lookup here.
AvatarAppearance appearance = null;
GetAvatarAppearance(client, out appearance);
presence.Appearance = appearance;
presence.initializeScenePresence(client, RegionInfo, this);
m_innerScene.AddScenePresence(presence);
@@ -1789,10 +1797,8 @@ namespace OpenSim.Region.Environment.Scenes
return avatar;
}
protected void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
{
appearance = CommsManager.UserService.GetUserAppearance(client.AgentId);
if (m_AvatarFactory == null ||
!m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance))
{