Invalid iterator in RelationTableView.cxx? (dbaccess module)

julien2412 serval2412 at yahoo.fr
Mon Feb 9 13:22:04 PST 2015


Hello,

On RelationTableView.cxx file, I noticed this:
     99     for(;aIter != rTabWinDataList.rend();++aIter)
    100     {
    101         TTableWindowData::value_type pData = *aIter;
    102         OTableWindow* pTabWin = createWindow(pData);
    103 
    104         if (!pTabWin->Init())
    105         {
... 
    112             rTabWinDataList.erase(
::std::remove(rTabWinDataList.begin(), rTabWinDataList.end(), *aIter),
rTabWinDataList.end());
    113             continue;
    114         }

idem block 139-143

See
http://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/relationdesign/RelationTableView.cxx#99

Shouldn't the "continue" be replaced by "break" to avoid invalid iterator or
"aIter" isn't invalid for "for loops" at all even after "erase" lines?

Julien



--
View this message in context: http://nabble.documentfoundation.org/Invalid-iterator-in-RelationTableView-cxx-dbaccess-module-tp4139541.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list