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.Grand@cib.de>
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 27549aa..4bf5c07 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -514,7 +514,14 @@ void Cell::replaceContentAndFormating( const CellRef& xSourceCell )
    if( xSourceCell.is() && mpProperties )
    {
        mpProperties->SetMergedItemSet( xSourceCell->GetObjectItemSet() );
        SetOutlinerParaObject( o3tl::make_unique<OutlinerParaObject>(*xSourceCell->GetOutlinerParaObject()) );

        // tdf#118354 OutlinerParaObject may be nullptr, do not dereference when
        // not set (!)
        if(nullptr != xSourceCell->GetOutlinerParaObject())
        {
            SetOutlinerParaObject( o3tl::make_unique<OutlinerParaObject>(*xSourceCell->GetOutlinerParaObject()) );
        }

        SdrTableObj& rTableObj = dynamic_cast< SdrTableObj& >( GetObject() );
        SdrTableObj& rSourceTableObj = dynamic_cast< SdrTableObj& >( xSourceCell->GetObject() );