diff --git a/Src/Model3/Real3D.cpp b/Src/Model3/Real3D.cpp index 3f11283..4034a23 100644 --- a/Src/Model3/Real3D.cpp +++ b/Src/Model3/Real3D.cpp @@ -232,8 +232,12 @@ void CReal3D::BeginFrame(void) // If multi-threaded, perform now any queued texture uploads to renderer before rendering begins if (g_Config.gpuMultiThreaded) { - for (vector::iterator it = queuedUploadTexturesRO.begin(), end = queuedUploadTexturesRO.end(); it != end; it++) - Render3D->UploadTextures(it->x, it->y, it->width, it->height); + for (const auto &it : queuedUploadTexturesRO) { + Render3D->UploadTextures(it.x, it.y, it.width, it.height); + } + + // done syncing data + queuedUploadTexturesRO.clear(); } Render3D->BeginFrame();