[Libreoffice-commits] core.git: svx/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 30 09:16:09 UTC 2018


 svx/source/table/cell.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ac0df3fa4fc3d69dd8cf0f7fce64050a14b94b15
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Oct 30 09:55:45 2018 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Oct 30 10:15:46 2018 +0100

    fix use-after-move
    
    after
        commit 50c63e5c2f7962e8893e2d04b0e958209432f4c9
        pass OutlinerParaObject around by std::unique_ptr
    
    spotted by Mike Kaganski
    
    Change-Id: Id69aafc8b0a0fb06165e3fc0cc6e6a29108b4d1f
    Reviewed-on: https://gerrit.libreoffice.org/62540
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index bbddd24b76fa..8eba9c1b4cd8 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -806,10 +806,11 @@ SdrTextHorzAdjust Cell::GetTextHorizontalAdjust() const
 
 void Cell::SetOutlinerParaObject( std::unique_ptr<OutlinerParaObject> pTextObject )
 {
+    bool bNullTextObject = pTextObject == nullptr;
     SdrText::SetOutlinerParaObject( std::move(pTextObject) );
     maSelection.nStartPara = EE_PARA_MAX_COUNT;
 
-    if( pTextObject == nullptr )
+    if( bNullTextObject )
         ForceOutlinerParaObject( OutlinerMode::TextObject );
 }
 


More information about the Libreoffice-commits mailing list