[Libreoffice-commits] core.git: chart2/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jan 27 20:42:07 UTC 2021
chart2/source/controller/main/ChartController_TextEdit.cxx | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
New commits:
commit ce188ba178de0b99ba60c9e7935a118ddceb80bb
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 27 09:32:46 2021 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jan 27 21:41:19 2021 +0100
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 at redhat.com>
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()
More information about the Libreoffice-commits
mailing list