diff options
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 24983ab..42231b5 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -928,8 +928,11 @@ namespace OpenSim.Region.Physics.Meshing | |||
928 | if (shouldCache) | 928 | if (shouldCache) |
929 | { | 929 | { |
930 | key = primShape.GetMeshKey(size, lod); | 930 | key = primShape.GetMeshKey(size, lod); |
931 | if (m_uniqueMeshes.TryGetValue(key, out mesh)) | 931 | lock (m_uniqueMeshes) |
932 | return mesh; | 932 | { |
933 | if (m_uniqueMeshes.TryGetValue(key, out mesh)) | ||
934 | return mesh; | ||
935 | } | ||
933 | } | 936 | } |
934 | 937 | ||
935 | if (size.X < 0.01f) size.X = 0.01f; | 938 | if (size.X < 0.01f) size.X = 0.01f; |
@@ -955,7 +958,10 @@ namespace OpenSim.Region.Physics.Meshing | |||
955 | 958 | ||
956 | if (shouldCache) | 959 | if (shouldCache) |
957 | { | 960 | { |
958 | m_uniqueMeshes.Add(key, mesh); | 961 | lock (m_uniqueMeshes) |
962 | { | ||
963 | m_uniqueMeshes.Add(key, mesh); | ||
964 | } | ||
959 | } | 965 | } |
960 | } | 966 | } |
961 | 967 | ||