diff options
-rw-r--r-- | xmloff/source/draw/shapeimport.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index c155b548a4d8..322d27cbe983 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -874,8 +874,10 @@ void ShapeSortContext::popGroupAndSort() { while( nIndex < rHint.nShould && !maUnsortedList.empty() ) { - ZOrderHint aGapHint( *maUnsortedList.begin() ); - maUnsortedList.erase(maUnsortedList.begin()); + auto it = maUnsortedList.begin(); + + ZOrderHint aGapHint(*it); + maUnsortedList.erase(it); moveShape( aGapHint.nIs, nIndex++ ); } |