diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-01-23 21:22:59 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-01-23 21:24:14 +0100 |
commit | 4d60e1a0832dafe05b4eecee7c9607bbd2ce1b07 (patch) | |
tree | 182d2fe927c804c372e52e20a99ee9989e3bfe90 /dbaccess | |
parent | 3a7ae48b6f610899200ae2800706533f7c4c9f80 (diff) |
Fix fdo#44040 VIEWING: Crash when page preview after <f4> (data sources)
Caolán fixed iterator management which was buggy. (thank you !)
(cherry picked from commit 82a061079ae03f841713fd26c809d45621a59836)
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 9ca13920b9af..7567542a2173 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1410,24 +1410,22 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const EventObject& _rSource ) thr Reference< XDispatch > xSource(_rSource.Source, UNO_QUERY); if(xSource.is()) { - for ( ExternalFeaturesMap::iterator aLoop = m_aExternalFeatures.begin(); - aLoop != m_aExternalFeatures.end(); - ++aLoop - ) + ExternalFeaturesMap::iterator aLoop = m_aExternalFeatures.begin(); + ExternalFeaturesMap::iterator aEnd = m_aExternalFeatures.end(); + while (aLoop != aEnd) { - if ( aLoop->second.xDispatcher.get() == xSource.get() ) + ExternalFeaturesMap::iterator aI = aLoop++; + if ( aI->second.xDispatcher.get() == xSource.get() ) { - ExternalFeaturesMap::iterator aPrevious = aLoop; - --aPrevious; + sal_uInt16 nSlot = aI->first; // remove it - m_aExternalFeatures.erase( aLoop ); + m_aExternalFeatures.erase(aI); // maybe update the UI - implCheckExternalSlot(aLoop->first); + implCheckExternalSlot(nSlot); // continue, the same XDispatch may be resposible for more than one URL - aLoop = aPrevious; } } } |