diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java index 84fcc975ec..92ce8955cb 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java @@ -972,12 +972,13 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria @Override public void onEvent(Event event) throws Exception { BroadCastMsg msg = (BroadCastMsg) event.getData(); - + MBroadcastMessage mbMessage = MBroadcastMessage.get(Env.getCtx(), msg.getIntData()); + + if (mbMessage == null) + return; switch (msg.getEventId()) { case BroadCastUtil.EVENT_TEST_BROADCAST_MESSAGE: - MBroadcastMessage mbMessage = MBroadcastMessage.get( - Env.getCtx(), msg.getIntData()); String currSession = Integer .toString(Env.getContextAsInt(Env.getCtx(), "AD_Session_ID")); @@ -990,8 +991,6 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria } break; case BroadCastUtil.EVENT_BROADCAST_MESSAGE: - mbMessage = MBroadcastMessage.get( - Env.getCtx(), msg.getIntData()); if (mbMessage.isValidUserforMessage()) { BroadcastMessageWindow messageWindow = new BroadcastMessageWindow(