From 4bf436475788846b83231e29e3961850712d2117 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 27 Feb 2013 19:05:06 -0500 Subject: [PATCH] IDEMPIERE-207 GL Journal Generator / Fix NPE when simulate option --- .../src/org/globalqss/process/GLJournalGenerate.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java b/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java index 1ca397d1a5..b90c1d7939 100644 --- a/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java +++ b/org.adempiere.base/src/org/globalqss/process/GLJournalGenerate.java @@ -521,8 +521,10 @@ public class GLJournalGenerate extends SvrProcess j.saveEx(); } - StringBuilder msg = new StringBuilder(Msg.parseTranslation(getCtx(), "@Created@ @GL_Journal_ID@=")).append(j.getDocumentNo()); - addLog(j.get_ID(), null, null, msg.toString(), MJournal.Table_ID, j.get_ID()); + if (j != null) { + StringBuilder msg = new StringBuilder(Msg.parseTranslation(getCtx(), "@Created@ @GL_Journal_ID@=")).append(j.getDocumentNo()); + addLog(j.get_ID(), null, null, msg.toString(), MJournal.Table_ID, j.get_ID()); + } return "@OK@"; } // doIt