summaryrefslogtreecommitdiff
path: root/reportbuilder
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-02-04 11:08:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-02-04 15:47:11 +0000
commitbf4ee8ee31cbaea1360eb5681d4cecd04844eb3a (patch)
tree2448c1e5c1cf38645bd338c806895f37c8f28f2e /reportbuilder
parentb3e0bd62f5c2223101ee693e042c8c400528803f (diff)
coverity#1326386 Dereference null return value
Change-Id: Ifd1cd2cfb6032e7a2d14d926d4de8be22160daee
Diffstat (limited to 'reportbuilder')
-rw-r--r--reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
index e629d43081a3..3f23ab3b4f63 100644
--- a/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
+++ b/reportbuilder/java/org/libreoffice/report/pentaho/output/OfficeDocumentReportTarget.java
@@ -1254,6 +1254,10 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget
final LexicalUnit cssValue = styleSheetParserUtil.parseLexicalStyleValue(
text);
+ if (cssValue == null) {
+ CSSNumericValue zeroLength = CSSNumericValue.createValue(CSSNumericType.CM, 0);
+ return zeroLength;
+ }
return CSSValueFactory.createLengthValue(cssValue);
}