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

New commits:
commit 1663326d292a6ed89215b7a188054a2e27d7832f
Author:     Armin Le Grand <armin.le.gr...@cib.de>
AuthorDate: Wed Jul 18 13:53:38 2018 +0200
Commit:     Armin Le Grand <armin.le.gr...@cib.de>
CommitDate: Thu Jul 19 11:29:34 2018 +0200

    tdf#118354 Do not dereference non-exsisting Object
    
    Change-Id: Ie7323302f3b29dfc19b26e2185321c2e609cab2b
    Reviewed-on: https://gerrit.libreoffice.org/57629
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <armin.le.gr...@cib.de>
    Reviewed-on: https://gerrit.libreoffice.org/57711

diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index b1364f6d60ff..8eadbd453804 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -511,7 +511,14 @@ void Cell::replaceContentAndFormating( const CellRef& 
xSourceCell )
     if( xSourceCell.is() && mpProperties )
     {
         mpProperties->SetMergedItemSet( xSourceCell->GetObjectItemSet() );
-        SetOutlinerParaObject( new 
OutlinerParaObject(*xSourceCell->GetOutlinerParaObject()) );
+
+        // tdf#118354 OutlinerParaObject may be nullptr, do not dereference 
when
+        // not set (!)
+        if(nullptr != xSourceCell->GetOutlinerParaObject())
+        {
+            SetOutlinerParaObject( new 
OutlinerParaObject(*xSourceCell->GetOutlinerParaObject()) );
+        }
+
         SdrTableObj& rTableObj = dynamic_cast< SdrTableObj& >( GetObject() );
         SdrTableObj& rSourceTableObj = dynamic_cast< SdrTableObj& >( 
xSourceCell->GetObject() );
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to