Commit c66b568f authored by David Thompson's avatar David Thompson Committed by Kitware Robot

Merge topic 'fix-crash'

92001e4e Fix a crash due to bad STL iterage.
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Acked-by: T.J. Corona's avatarT.J. Corona <tj.corona@kitware.com>
Merge-request: !1469
parents a155d9d0 92001e4e
......@@ -42,11 +42,15 @@ std::set<Operation::Index> ExporterGroup::operationsForResourceAndFileName(
void ExporterGroup::filterOperationsThatRejectFileName(
std::set<Operation::Index>& ops, const std::string& fileName) const
{
for (auto index = ops.begin(); index != ops.end(); ++index)
for (auto index = ops.begin(); index != ops.end();)
{
if (fileItemDefinitionForOperation(*index)->isValueValid(fileName) == false)
{
ops.erase(index);
ops.erase(index++);
}
else
{
++index;
}
}
}
......
......@@ -42,11 +42,15 @@ std::set<Operation::Index> ImporterGroup::operationsForResourceAndFileName(
void ImporterGroup::filterOperationsThatRejectFileName(
std::set<Operation::Index>& ops, const std::string& fileName) const
{
for (auto index = ops.begin(); index != ops.end(); ++index)
for (auto index = ops.begin(); index != ops.end();)
{
if (fileItemDefinitionForOperation(*index)->isValueValid(fileName) == false)
{
ops.erase(index);
ops.erase(index++);
}
else
{
++index;
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment