cui/source/dialogs/cuigaldlg.cxx |    5 ++---
 sw/source/filter/ww8/wrtww8.cxx  |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit 9007ca10a3f2e11fabcd7bed74cf28da2920ce2f
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Mar 4 15:19:01 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Mar 4 22:36:45 2022 +0100

    cid#1500569 (likely) silence Explicit null dereferenced
    
    Change-Id: Ib44b3dcb94998ce7bf28c9dc1cd3ca7acc6e5190
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130998
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 0274944d26d6..63b27a2af334 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -3728,7 +3728,7 @@ ErrCode SwWW8Writer::WriteStorage()
                     
xComponentContext->getServiceManager()->createInstanceWithArgumentsAndContext(
                         "com.sun.star.comp.oox.crypto." + sCryptoType, 
aArguments, xComponentContext), uno::UNO_QUERY);
 
-                if (xPackageEncryption.is())
+                if (xPackageEncryption)
                 {
                     // We have an encryptor
                     // Create new temporary storage for content
commit 4ffb36265312f18e4c382fc6ff8940c5cdf268ca
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Mar 4 15:11:38 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Mar 4 22:36:30 2022 +0100

    cid#1500632 Using a moved object
    
    Change-Id: I5e7dd51c9f9b2b295ded161307bbe9a6a23c42de
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130997
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 559e878ce25c..fd1f4a36e10d 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -334,7 +334,8 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void)
         if( !aRemoveEntries[ i ] )
             aRemainingVector.push_back( m_pTabPage->aFoundList[i] );
 
-    m_pTabPage->aFoundList = std::move(aRemainingVector);
+    std::swap(m_pTabPage->aFoundList, aRemainingVector);
+    aRemainingVector.clear();
 
     // refill list box
     for( i = 0, nCount = aRemoveEntries.size(); i < nCount; ++i )
@@ -342,10 +343,8 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl, void*, void)
             aRemainingVector.push_back(m_pTabPage->m_xLbxFound->get_text(i));
 
     m_pTabPage->m_xLbxFound->clear();
-
     for( i = 0, nCount = aRemainingVector.size(); i < nCount; ++i )
         m_pTabPage->m_xLbxFound->append_text(aRemainingVector[i]);
-
     aRemainingVector.clear();
 
     m_pTabPage->m_xLbxFound->thaw();

Reply via email to