Found NPE on the temporary validation code

[ adempiere-ZK Web Client-2832968 ] User context lost?
This commit is contained in:
Carlos Ruiz 2009-12-14 19:44:03 +00:00
parent 88ed92f08e
commit 4c58c7e1c1
1 changed files with 3 additions and 1 deletions

View File

@ -250,7 +250,9 @@ public abstract class AbstractADWindowPanel extends AbstractUIPart implements To
// https://sourceforge.net/tracker/?func=detail&atid=955896&aid=2832968&group_id=176962 // https://sourceforge.net/tracker/?func=detail&atid=955896&aid=2832968&group_id=176962
// it's harmless, if there is no bug then this must never fail // it's harmless, if there is no bug then this must never fail
Session currSess = Executions.getCurrent().getDesktop().getSession(); Session currSess = Executions.getCurrent().getDesktop().getSession();
int checkad_user_id=(Integer)currSess.getAttribute("Check_AD_User_ID"); int checkad_user_id = -1;
if (currSess != null && currSess.getAttribute("Check_AD_User_ID") != null)
checkad_user_id = (Integer)currSess.getAttribute("Check_AD_User_ID");
if (checkad_user_id!=Env.getAD_User_ID(ctx)) if (checkad_user_id!=Env.getAD_User_ID(ctx))
{ {
String msg = "Bug 2832968 SessionUser=" String msg = "Bug 2832968 SessionUser="