]> jaekl.net Git - cfb.git/commitdiff
Don't try to output HTML unless an output file is specified.
authorChris Jaekl <cejaekl@yahoo.com>
Sat, 31 Oct 2015 13:49:01 +0000 (22:49 +0900)
committerChris Jaekl <cejaekl@yahoo.com>
Sat, 31 Oct 2015 13:49:01 +0000 (22:49 +0900)
(Dereferencing a null pointer is considered harmful).

prod/net/jaekl/cfb/CFB.java

index 33a1ca04b23312d3e19b05efbc8e8b5cfc2f1546..178dc2fe139b686a417b2d7c96fdb5a7088608a0 100644 (file)
@@ -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);