From 5f763178079daec7c966584cbedc66daaf516c76 Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 6 Mar 2017 18:14:43 +0100 Subject: [PATCH] Wait for completion of CreateMapItem on exit to avoid potential threading issue --- apps/openmw/mwrender/globalmap.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/openmw/mwrender/globalmap.cpp b/apps/openmw/mwrender/globalmap.cpp index 2536818ef..24f6de6ce 100644 --- a/apps/openmw/mwrender/globalmap.cpp +++ b/apps/openmw/mwrender/globalmap.cpp @@ -238,6 +238,9 @@ namespace MWRender removeCamera(*it); for (CameraVector::iterator it = mActiveCameras.begin(); it != mActiveCameras.end(); ++it) removeCamera(*it); + + if (mWorkItem) + mWorkItem->waitTillDone(); } void GlobalMap::render ()