From: Chris Jaekl Date: Sat, 31 Oct 2015 13:49:01 +0000 (+0900) Subject: Don't try to output HTML unless an output file is specified. X-Git-Url: http://jaekl.net/gitweb/?p=cfb.git;a=commitdiff_plain;h=48cbf8ce43a3fa412ab589821c3e2dca85a1a303;hp=4173dc72e969e6e3f51c9cb4734b07ec664db975 Don't try to output HTML unless an output file is specified. (Dereferencing a null pointer is considered harmful). --- 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);