Fix composite map being compiled twice

This commit is contained in:
scrawl 2017-03-09 19:28:02 +01:00
parent 683e625c6c
commit 8a6d909b22

View file

@ -121,8 +121,14 @@ void CompositeMapRenderer::addCompositeMap(CompositeMap* compositeMap, bool imme
void CompositeMapRenderer::setImmediate(CompositeMap* compositeMap) void CompositeMapRenderer::setImmediate(CompositeMap* compositeMap)
{ {
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mMutex); OpenThreads::ScopedLock<OpenThreads::Mutex> lock(mMutex);
mImmediateCompileSet.insert(compositeMap); CompileSet::iterator found = mCompileSet.find(compositeMap);
mCompileSet.erase(compositeMap); if (found == mCompileSet.end())
return;
else
{
mImmediateCompileSet.insert(compositeMap);
mCompileSet.erase(found);
}
} }
CompositeMap::~CompositeMap() CompositeMap::~CompositeMap()