valgrind: use after free

i.e. since b35980d9b

seems remove, remove, delete was old pattern, new patterns ended up
as remove+delete, remove. Reorder to remove, remove+delete

Change-Id: I54ec8d0296e751110c516516465be2ac0615f6a1
This commit is contained in:
Caolán McNamara
2012-08-09 10:34:50 +01:00
parent 9c9cf6ed4a
commit 069caf79d7

View File

@@ -2688,8 +2688,8 @@ void CharAttribList::OptimizeRanges( SfxItemPool& rItemPool )
if (*rNext.GetItem() == *rAttr.GetItem())
{
rAttr.GetEnd() = rNext.GetEnd();
aAttribs.erase(aAttribs.begin()+nNext);
rItemPool.Remove(*rNext.GetItem());
aAttribs.erase(aAttribs.begin()+nNext);
}
break; // only 1 attr with same which can start here.
}