Add mutex lock around access to Model::_calculatedMeshPartOffset

This commit is contained in:
Ryan Huffman 2015-06-19 16:51:13 -07:00
parent a7f291154b
commit 1371f775ee

View file

@ -2021,7 +2021,9 @@ void Model::renderPart(RenderArgs* args, int meshIndex, int partIndex, bool tran
}
}
_mutex.lock();
qint64 offset = _calculatedMeshPartOffset[QPair<int,int>(meshIndex, partIndex)];
_mutex.unlock();
if (part.quadIndices.size() > 0) {
batch.drawIndexed(gpu::QUADS, part.quadIndices.size(), offset);