Graphics/ForwardRenderQueue: Fix error

Former-commit-id: a396c373b51128c57f5d8f98291f821b0bfc0c76
This commit is contained in:
Lynix 2015-12-11 13:08:32 +01:00
parent ee16bee137
commit bff0e2df21
1 changed files with 3 additions and 2 deletions

View File

@ -502,16 +502,17 @@ namespace Nz
layers.clear();
else
{
for (auto it = layers.begin(); it != layers.end(); ++it)
for (auto it = layers.begin(); it != layers.end();)
{
Layer& layer = it->second;
if (layer.clearCount++ >= 100)
it = layers.erase(it);
layers.erase(it++);
else
{
layer.otherDrawables.clear();
layer.transparentModels.clear();
layer.transparentModelData.clear();
++it;
}
}
}