diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-08-16 12:10:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-08-17 09:51:42 +0200 |
commit | bf237656f829f64805af18a112dda76b4b986429 (patch) | |
tree | 733249af15c9909c409cc77c884501f2e71faea4 /oox | |
parent | 773f7a5223cb745d31243dfe20246e922cb7ad36 (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/drawingml/chart/seriesconverter.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
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 ); |