aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.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/ScenePresence.cs
parent* minor: spelling mistake and message tidying on Migration messages (diff)
downloadopensim-SC-9cdd9e215ccb250992b82e229a9930c2648f827c.zip
opensim-SC-9cdd9e215ccb250992b82e229a9930c2648f827c.tar.gz
opensim-SC-9cdd9e215ccb250992b82e229a9930c2648f827c.tar.bz2
opensim-SC-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 '')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs22
1 files changed, 18 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index abda63e..ff043fb 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -2911,19 +2911,33 @@ namespace OpenSim.Region.Environment.Scenes
2911 2911
2912 private void ItemReceived(UUID itemID) 2912 private void ItemReceived(UUID itemID)
2913 { 2913 {
2914 if (null == m_appearance)
2915 {
2916 m_log.Warn("[ATTACHMENT] Appearance has not been initialized");
2917 return;
2918 }
2919
2914 int attachpoint = m_appearance.GetAttachpoint(itemID); 2920 int attachpoint = m_appearance.GetAttachpoint(itemID);
2915 if (attachpoint == 0) 2921 if (attachpoint == 0)
2916 return; 2922 return;
2917 2923
2918 UUID asset = m_appearance.GetAttachedAsset(attachpoint); 2924 UUID asset = m_appearance.GetAttachedAsset(attachpoint);
2919 if (asset == UUID.Zero) // We have just logged in 2925 if (UUID.Zero == asset) // We have just logged in
2920 { 2926 {
2921 m_log.InfoFormat("[ATTACHMENT] Rez attachment {0}", 2927 m_log.InfoFormat("[ATTACHMENT] Rez attachment {0}",
2922 itemID.ToString()); 2928 itemID.ToString());
2923 2929
2924 // Rez from inventory 2930 try
2925 m_scene.RezSingleAttachment(ControllingClient, itemID, 2931 {
2926 (uint)attachpoint, 0, 0); 2932 // Rez from inventory
2933 m_scene.RezSingleAttachment(ControllingClient, itemID,
2934 (uint)attachpoint, 0, 0);
2935 }
2936 catch (Exception e)
2937 {
2938 m_log.ErrorFormat("[ATTACHMENT] Unable to rez attachment: {0}", e.ToString());
2939 }
2940
2927 return; 2941 return;
2928 } 2942 }
2929 2943