diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-01-27 09:32:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-01-27 21:41:19 +0100 |
commit | ce188ba178de0b99ba60c9e7935a118ddceb80bb (patch) | |
tree | 87433d730767559e113d79446f7eedcb9873e3f1 /chart2/source/controller/main | |
parent | e2befe5302847a4bcb00c7429886aa2c5c7928bd (diff) |
cid#1472567 Dereference null return value
Change-Id: If5e63883c831ee1ff164126750db86e4c2ec2efd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110006
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2/source/controller/main')
-rw-r--r-- | chart2/source/controller/main/ChartController_TextEdit.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx index ae18162d8a80..217accdde083 100644 --- a/chart2/source/controller/main/ChartController_TextEdit.cxx +++ b/chart2/source/controller/main/ChartController_TextEdit.cxx @@ -70,9 +70,11 @@ void ChartController::StartTextEdit( const Point* pMousePixel ) if( xChartViewProps.is() ) xChartViewProps->setPropertyValue( "SdrViewIsInEditMode", uno::Any(true) ); + auto pChartWindow(GetChartWindow()); + bool bEdit = m_pDrawViewWrapper->SdrBeginTextEdit( pTextObj , m_pDrawViewWrapper->GetPageView() - , GetChartWindow() + , pChartWindow , false //bIsNewObj , pOutliner , nullptr //pOutlinerView @@ -96,9 +98,12 @@ void ChartController::StartTextEdit( const Point* pMousePixel ) } } - //we invalidate the outliner region because the outliner has some - //paint problems (some characters are painted twice a little bit shifted) - GetChartWindow()->Invalidate( m_pDrawViewWrapper->GetMarkedObjBoundRect() ); + if (pChartWindow) + { + //we invalidate the outliner region because the outliner has some + //paint problems (some characters are painted twice a little bit shifted) + pChartWindow->Invalidate( m_pDrawViewWrapper->GetMarkedObjBoundRect() ); + } } bool ChartController::EndTextEdit() |