diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-12-28 10:59:30 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-12-28 15:10:39 +0100 |
commit | 85be6c20ee99382a2d59d08688cb11aed016f043 (patch) | |
tree | 1e7d943794348c34ea4e41260bac3948fa644aa0 | |
parent | 2006145e9c8df557f3c1f1834bd4579c03a18f42 (diff) |
cid#1637331 silence Using invalid iterator
Change-Id: Ia706dbbb397f80069bace68e831b082de11d8557
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179488
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | desktop/source/lib/init.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 9f42a3524707..389225e4fc31 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -7693,8 +7693,9 @@ static void lo_setDocumentPassword(LibreOfficeKit* pThis, assert(pThis); assert(pURL); LibLibreOffice_Impl *const pLib = static_cast<LibLibreOffice_Impl*>(pThis); - assert(pLib->mInteractionMap.contains(OString(pURL))); - pLib->mInteractionMap.find(OString(pURL))->second->SetPassword(pPassword); + auto it = pLib->mInteractionMap.find(OString(pURL)); + assert(it != pLib->mInteractionMap.end()); + it->second->SetPassword(pPassword); } static char* lo_getVersionInfo(SAL_UNUSED_PARAMETER LibreOfficeKit* /*pThis*/) |