From 48cbf8ce43a3fa412ab589821c3e2dca85a1a303 Mon Sep 17 00:00:00 2001 From: Chris Jaekl Date: Sat, 31 Oct 2015 22:49:01 +0900 Subject: [PATCH] Don't try to output HTML unless an output file is specified. (Dereferencing a null pointer is considered harmful). --- prod/net/jaekl/cfb/CFB.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/prod/net/jaekl/cfb/CFB.java b/prod/net/jaekl/cfb/CFB.java index 33a1ca0..178dc2f 100644 --- a/prod/net/jaekl/cfb/CFB.java +++ b/prod/net/jaekl/cfb/CFB.java @@ -218,7 +218,9 @@ public class CFB { Delta delta = new Delta(prior, analysis); HtmlReport report = new HtmlReport(m_bundle, messageMap.getColl(), delta); - report.write(m_output); + if (null != m_output) { + report.write(m_output); + } Notifier notifier = new Notifier(m_bundle, m_config); notifier.sendEmailIfNeeded(pw, report); -- 2.39.2