From abb3bb60a6ef0a3ed92d3fa54dc47d4d3e560b36 Mon Sep 17 00:00:00 2001 From: Magnuz Binder Date: Sat, 23 May 2015 13:48:37 +0200 Subject: Fix mesh cache race condition in llCastRay V3. Signed-off-by: Michael Cerquoni --- OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e769834..c5e02a6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -14318,7 +14318,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { lock(m_cachedMeshes) { - m_cachedMeshes.Add(meshKey, mesh); + if (!m_cachedMeshes.ContainsKey(meshKey)) + m_cachedMeshes.Add(meshKey, mesh); } } } @@ -14395,7 +14396,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { lock(m_cachedMeshes) { - m_cachedMeshes.Add(meshKey, mesh); + if (!m_cachedMeshes.ContainsKey(meshKey)) + m_cachedMeshes.Add(meshKey, mesh); } } } -- cgit v1.1