From ef16561272dd3c5cf3630e7727b66b4f84f16afc Mon Sep 17 00:00:00 2001 From: jendib Date: Thu, 24 Mar 2016 00:35:53 +0100 Subject: [PATCH] Fix PDF export if description is null --- .../src/main/java/com/sismics/docs/core/util/pdf/PdfPage.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs-core/src/main/java/com/sismics/docs/core/util/pdf/PdfPage.java b/docs-core/src/main/java/com/sismics/docs/core/util/pdf/PdfPage.java index af9aafb2..0adae219 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/util/pdf/PdfPage.java +++ b/docs-core/src/main/java/com/sismics/docs/core/util/pdf/PdfPage.java @@ -99,6 +99,10 @@ public class PdfPage implements Closeable { * @throws IOException */ private void drawText(float paragraphWidth, PDFont font, int fontSize, String text, boolean centered) throws IOException { + if (text == null) { + return; + } + pdContent.setFont(font, fontSize); int start = 0; int end = 0;