diff options
author | Sean Dague | 2008-05-19 20:33:54 +0000 |
---|---|---|
committer | Sean Dague | 2008-05-19 20:33:54 +0000 |
commit | 7a52b35c574da5180131e1b5df613c4df09a5065 (patch) | |
tree | 0c2b3c01b419bba56d652176d82ec8faf6c73f6c /OpenSim/Region/Environment/Scenes/Scene.cs | |
parent | Thank you kindly, Melanie for a patch that avoids a null (diff) | |
download | opensim-SC_OLD-7a52b35c574da5180131e1b5df613c4df09a5065.zip opensim-SC_OLD-7a52b35c574da5180131e1b5df613c4df09a5065.tar.gz opensim-SC_OLD-7a52b35c574da5180131e1b5df613c4df09a5065.tar.bz2 opensim-SC_OLD-7a52b35c574da5180131e1b5df613c4df09a5065.tar.xz |
fix crash in standalone mode for initial appearance setup
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index d02d22f..b2d45d1 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -1549,6 +1549,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1549 | presence = m_restorePresences[client.AgentId]; | 1549 | presence = m_restorePresences[client.AgentId]; |
1550 | m_restorePresences.Remove(client.AgentId); | 1550 | m_restorePresences.Remove(client.AgentId); |
1551 | 1551 | ||
1552 | // This is one of two paths to create avatars that are | ||
1553 | // used. This tends to get called more in standalone | ||
1554 | // than grid, not really sure why, but as such needs | ||
1555 | // an explicity appearance lookup here. | ||
1556 | AvatarAppearance appearance = null; | ||
1557 | GetAvatarAppearance(client, out appearance); | ||
1558 | presence.Appearance = appearance; | ||
1559 | |||
1552 | presence.initializeScenePresence(client, RegionInfo, this); | 1560 | presence.initializeScenePresence(client, RegionInfo, this); |
1553 | 1561 | ||
1554 | m_innerScene.AddScenePresence(presence); | 1562 | m_innerScene.AddScenePresence(presence); |
@@ -1789,10 +1797,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1789 | return avatar; | 1797 | return avatar; |
1790 | } | 1798 | } |
1791 | 1799 | ||
1792 | protected void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) | 1800 | public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) |
1793 | { | 1801 | { |
1794 | appearance = CommsManager.UserService.GetUserAppearance(client.AgentId); | ||
1795 | |||
1796 | if (m_AvatarFactory == null || | 1802 | if (m_AvatarFactory == null || |
1797 | !m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance)) | 1803 | !m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance)) |
1798 | { | 1804 | { |