aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-09-12 21:32:45 +0000
committerJustin Clarke Casey2008-09-12 21:32:45 +0000
commit9cdd9e215ccb250992b82e229a9930c2648f827c (patch)
tree64ca8b6035a26ccee4e3bdf92878ebefb95d4a1d /OpenSim/Region/Environment/Scenes/Scene.cs
parent* minor: spelling mistake and message tidying on Migration messages (diff)
downloadopensim-SC_OLD-9cdd9e215ccb250992b82e229a9930c2648f827c.zip
opensim-SC_OLD-9cdd9e215ccb250992b82e229a9930c2648f827c.tar.gz
opensim-SC_OLD-9cdd9e215ccb250992b82e229a9930c2648f827c.tar.bz2
opensim-SC_OLD-9cdd9e215ccb250992b82e229a9930c2648f827c.tar.xz
* Patch http://opensimulator.org/mantis/view.php?id=2172
* Patch attached that adds the check for uninitialized appearance when inventory items are received and processed. Also attempts to ensure that appearance is initialized even when the profile cache has not been built. * This will not fix the race condition, but should at least remove the unhandled exception that is being reported in Mantis 0002126. * Thanks cmickeyb
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.cs17
1 files changed, 8 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 5b58804..da76ab8 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -2382,24 +2382,23 @@ namespace OpenSim.Region.Environment.Scenes
2382 /// <param name="appearance"></param> 2382 /// <param name="appearance"></param>
2383 public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance) 2383 public void GetAvatarAppearance(IClientAPI client, out AvatarAppearance appearance)
2384 { 2384 {
2385 appearance = null; // VS needs this line, mono doesn't 2385 appearance = new AvatarAppearance();
2386 2386
2387 try 2387 try
2388 { 2388 {
2389 if (m_AvatarFactory == null || 2389 if (m_AvatarFactory != null)
2390 !m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance))
2391 { 2390 {
2392 m_log.Warn("[APPEARANCE]: Appearance not found, creating default"); 2391 if (m_AvatarFactory.TryGetAvatarAppearance(client.AgentId, out appearance))
2393 appearance = new AvatarAppearance(); 2392 return;
2394 } 2393 }
2395 } 2394 }
2396 catch (Exception e) 2395 catch (Exception e)
2397 { 2396 {
2398 m_log.ErrorFormat( 2397 m_log.ErrorFormat("[APPEARANCE]: Problem fetching appearance for avatar {0}, {1}, {2}",
2399 "[APPERANCE]: Problem when fetching appearance for avatar {0}, {1}, using default. {2}", 2398 client.Name, client.AgentId, e.ToString());
2400 client.Name, client.AgentId, e);
2401 appearance = new AvatarAppearance();
2402 } 2399 }
2400 m_log.Warn("[APPEARANCE]: Appearance not found, returning default");
2401
2403 } 2402 }
2404 2403
2405 /// <summary> 2404 /// <summary>