oox/source/drawingml/chart/seriesconverter.cxx |    5 ++---
 sw/source/uibase/uiview/viewport.cxx           |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

New commits:
commit bf237656f829f64805af18a112dda76b4b986429
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Aug 16 12:10:52 2022 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Aug 17 09:51:42 2022 +0200

    cid#1500403 Dereference before null check
    
    Change-Id: I0246551dd84cc7637d4a7a7fc0763ef2d084049f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138390
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/oox/source/drawingml/chart/seriesconverter.cxx 
b/oox/source/drawingml/chart/seriesconverter.cxx
index 2676b70c9ad0..db3916b74f63 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -353,8 +353,7 @@ void DataLabelConverter::convertFromModel( const Reference< 
XDataSeries >& rxDat
                     convertTextProperty( aPropertySet, getFormatter(), 
mrModel.mxText->mxTextBody );
                     pRun->getTextCharacterProperties().pushToPropSet( 
aPropertySet, getFilter() );
 
-                    TextField* pField = nullptr;
-                    if( ( pField = dynamic_cast< TextField* >( pRun.get() ) ) )
+                    if (TextField* pField = 
dynamic_cast<TextField*>(pRun.get()))
                     {
                         DataPointCustomLabelFieldType eType = 
lcl_ConvertFieldNameToFieldEnum( pField->getType() );
 
@@ -370,7 +369,7 @@ void DataLabelConverter::convertFromModel( const Reference< 
XDataSeries >& rxDat
                         xCustomLabel->setFieldType( eType );
                         xCustomLabel->setGuid( pField->getUuid() );
                     }
-                    else if( pRun )
+                    else
                     {
                         xCustomLabel->setString( pRun->getText() );
                         xCustomLabel->setFieldType( 
DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_TEXT );
commit 773f7a5223cb745d31243dfe20246e922cb7ad36
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Aug 16 11:56:56 2022 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Aug 17 09:51:27 2022 +0200

    cid#1500480 Dereference before null check
    
    Change-Id: I15d9bd7be89eca4552f3d36571caa6a97dcc1b3a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138389
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sw/source/uibase/uiview/viewport.cxx 
b/sw/source/uibase/uiview/viewport.cxx
index 7a62667570b9..8e7a959dec58 100644
--- a/sw/source/uibase/uiview/viewport.cxx
+++ b/sw/source/uibase/uiview/viewport.cxx
@@ -303,7 +303,7 @@ void SwView::SetVisArea( const Point &rPt, bool 
bUpdateScrollbar )
     if ( aPt == m_aVisArea.TopLeft() )
         return;
 
-    if (m_pWrtShell && 
m_pWrtShell->GetViewOptions()->IsShowOutlineContentVisibilityButton())
+    if (GetWrtShell().GetViewOptions()->IsShowOutlineContentVisibilityButton())
         
GetEditWin().GetFrameControlsManager().HideControls(FrameControlType::Outline);
 
     const tools::Long lXDiff = m_aVisArea.Left() - aPt.X();

Reply via email to