diff options
-rw-r--r-- | sw/source/uibase/docvw/PostItMgr.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx index 06c0bc6d75ce..f88c6a19a881 100644 --- a/sw/source/uibase/docvw/PostItMgr.cxx +++ b/sw/source/uibase/docvw/PostItMgr.cxx @@ -246,10 +246,10 @@ SwPostItMgr::~SwPostItMgr() void SwPostItMgr::CheckForRemovedPostIts() { bool bRemoved = false; - for(auto i = mvPostItFields.begin(); i != mvPostItFields.end(); ++i) + for(auto i = mvPostItFields.begin(); i != mvPostItFields.end(); ) { - auto it = ++i; - if ( it != mvPostItFields.end() && !(*it)->UseElement() ) + auto it = i++; + if ( !(*it)->UseElement() ) { SwSidebarItem* p = (*it); mvPostItFields.remove(*it); |