diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-07-18 13:53:38 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-07-18 15:40:04 +0200 |
commit | c28ec6d9fbb21b363102faac0171de2754ea5d75 (patch) | |
tree | 3b7a8816aa362c4cae03117f8bf86be7d2c1da3f /svx | |
parent | f35e3b36b0df830d0259d9d754c3da1946da3e6b (diff) |
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>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/table/cell.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx index 27549aaa4101..4bf5c07f38cf 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() ); |