mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 03:35:27 +00:00
Merge branch 'fix-iterator-badness' into 'master'
Actually increment iterators to be erased. Closes #6163 See merge request OpenMW/openmw!1027
This commit is contained in:
commit
7c246b28e7
@ -598,7 +598,7 @@ namespace Shader
|
||||
for (auto itr = writableStateSet->getUniformList().begin(); itr != writableStateSet->getUniformList().end();)
|
||||
{
|
||||
if (addedState->hasUniform(itr->first))
|
||||
writableStateSet->getUniformList().erase(itr);
|
||||
writableStateSet->getUniformList().erase(itr++);
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
@ -606,7 +606,7 @@ namespace Shader
|
||||
for (auto itr = writableStateSet->getModeList().begin(); itr != writableStateSet->getModeList().end();)
|
||||
{
|
||||
if (addedState->hasMode(itr->first))
|
||||
writableStateSet->getModeList().erase(itr);
|
||||
writableStateSet->getModeList().erase(itr++);
|
||||
else
|
||||
++itr;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user