aboutsummaryrefslogtreecommitdiff
path: root/src/server/collision/Management/VMapManager2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/collision/Management/VMapManager2.cpp')
-rw-r--r--src/server/collision/Management/VMapManager2.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/collision/Management/VMapManager2.cpp b/src/server/collision/Management/VMapManager2.cpp
index 9f32c749c5c..0632542f82e 100644
--- a/src/server/collision/Management/VMapManager2.cpp
+++ b/src/server/collision/Management/VMapManager2.cpp
@@ -247,6 +247,9 @@ namespace VMAP
WorldModel* VMapManager2::acquireModelInstance(const std::string& basepath, const std::string& filename)
{
+ //! Critical section, thread safe access to iLoadedModelFiles
+ TRINITY_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
+
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
if (model == iLoadedModelFiles.end())
{
@@ -267,6 +270,9 @@ namespace VMAP
void VMapManager2::releaseModelInstance(const std::string &filename)
{
+ //! Critical section, thread safe access to iLoadedModelFiles
+ TRINITY_GUARD(ACE_Thread_Mutex, LoadedModelFilesLock);
+
ModelFileMap::iterator model = iLoadedModelFiles.find(filename);
if (model == iLoadedModelFiles.end())
{