summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-18 08:56:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-18 12:00:18 +0200
commitb6f452fcdf4dc206943fbe8d43822acb33cf1834 (patch)
tree0e5ed5bec466a10d792d3c8f0975868cfd833b06 /ucb
parent4b65103510a5f0d347192ed94729a1b351f4aa7b (diff)
cid#1448431 Using invalid iterator
if we are checking itnew against end in the first block, presumably the second block use of itnew needs the same guard Change-Id: Ia8cc45229024e477c00b2356665d5656d36f723b Reviewed-on: https://gerrit.libreoffice.org/75828 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/ucp/file/filtask.cxx25
1 files changed, 14 insertions, 11 deletions
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index db1e4ca19dda..3c54c50b8ed4 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -2717,21 +2717,24 @@ TaskManager::getContentExchangedEventListeners( const OUString& aOldPrefix,
m_aContent.erase( itold );
- if( itnew != m_aContent.end() && !itnew->second.notifier.empty() )
+ if (itnew != m_aContent.end())
{
- std::vector<Notifier*>& listOfNotifiers = itnew->second.notifier;
- for (auto const& pointer : listOfNotifiers)
+ if (!itnew->second.notifier.empty())
{
- std::unique_ptr<ContentEventNotifier> notifier = pointer->cEXC( aNewName );
- if( notifier )
- aVector.push_back( std::move(notifier) );
+ std::vector<Notifier*>& listOfNotifiers = itnew->second.notifier;
+ for (auto const& pointer : listOfNotifiers)
+ {
+ std::unique_ptr<ContentEventNotifier> notifier = pointer->cEXC( aNewName );
+ if( notifier )
+ aVector.push_back( std::move(notifier) );
+ }
}
- }
- // Merge with preexisting notifiers
- // However, these may be in status BaseContent::Deleted
- for( const auto& rCopyPtr : copyList )
- itnew->second.notifier.push_back( rCopyPtr );
+ // Merge with preexisting notifiers
+ // However, these may be in status BaseContent::Deleted
+ for( const auto& rCopyPtr : copyList )
+ itnew->second.notifier.push_back( rCopyPtr );
+ }
}
}
}