IDEMPIERE-5811 - Fix NPE on event for BroadcastMessages (#1954)
This commit is contained in:
parent
3f1367a1f5
commit
5af9e7de56
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue