From a7f291154b0a39ad59be65013aadf900605609be Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Fri, 19 Jun 2015 16:28:58 -0700 Subject: [PATCH] Add lock around recalculateMeshPartOffsets call --- libraries/render-utils/src/Model.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index 795e184735..086139c646 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -1811,7 +1811,9 @@ void Model::renderPart(RenderArgs* args, int meshIndex, int partIndex, bool tran // We need to make sure we have valid offsets calculated before we can render if (!_calculatedMeshPartOffsetValid) { + _mutex.lock(); recalculateMeshPartOffsets(); + _mutex.unlock(); } auto textureCache = DependencyManager::get();