summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx26
1 files changed, 13 insertions, 13 deletions
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index fe90321e6398..51fb129cddb1 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -926,23 +926,23 @@ void SAL_CALL PasswordContainer::removePersistent( const OUString& aURL, const O
auto aNPIter = std::find_if(aIter->second.begin(), aIter->second.end(),
[&aName](const NamePassRecord& rNPRecord) { return rNPRecord.GetUserName() == aName; });
- if (aNPIter != aIter->second.end())
+ if (aNPIter == aIter->second.end())
+ return;
+
+ if( aNPIter->HasPasswords( PERSISTENT_RECORD ) )
{
- if( aNPIter->HasPasswords( PERSISTENT_RECORD ) )
- {
- // TODO/LATER: should the password be converted to MemoryPassword?
- aNPIter->RemovePasswords( PERSISTENT_RECORD );
+ // TODO/LATER: should the password be converted to MemoryPassword?
+ aNPIter->RemovePasswords( PERSISTENT_RECORD );
- if ( m_pStorageFile )
- m_pStorageFile->remove( aURL, aName ); // remove record ( aURL, aName )
- }
+ if ( m_pStorageFile )
+ m_pStorageFile->remove( aURL, aName ); // remove record ( aURL, aName )
+ }
- if( !aNPIter->HasPasswords( MEMORY_RECORD ) )
- aIter->second.erase( aNPIter );
+ if( !aNPIter->HasPasswords( MEMORY_RECORD ) )
+ aIter->second.erase( aNPIter );
- if( aIter->second.empty() )
- m_aContainer.erase( aIter );
- }
+ if( aIter->second.empty() )
+ m_aContainer.erase( aIter );
}
void SAL_CALL PasswordContainer::removeAllPersistent()