summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-01 11:16:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-01 17:46:03 +0200
commit88af6826a78dcacee4270dc65108a4123b46fb12 (patch)
treee2b2be4a9ff0014d43b320956ba3c916ba601b78 /chart2
parentaeeb6d5206e813b037a3957aa8fb94c490d2729d (diff)
forcepoint#60 FPE
Change-Id: I7de20dce834d4c41531487d79071db47e9260e73 Reviewed-on: https://gerrit.libreoffice.org/58403 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/main/VLegend.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 17889044e591..34511f3885e7 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -243,6 +243,8 @@ void lcl_collectRowHeighs( std::vector< sal_Int32 >& rRowHeights, const sal_Int3
sal_Int32 lcl_getTextLineHeight( const std::vector< sal_Int32 >& aRowHeights, const sal_Int32 nNumberOfRows, double fViewFontSize )
{
const sal_Int32 nFontHeight = static_cast< sal_Int32 >( fViewFontSize );
+ if (!nFontHeight)
+ return 0;
sal_Int32 nTextLineHeight = nFontHeight;
for (sal_Int32 nRow = 0; nRow < nNumberOfRows; ++nRow)
{