BF [ 1891775 ] NPE on GrindWindowVO when no access

This commit is contained in:
teo_sarca 2008-02-12 08:14:27 +00:00
parent 77269ce5d8
commit e235d6daaf
1 changed files with 2 additions and 2 deletions

View File

@ -167,11 +167,11 @@ public class GridWindowVO implements Serializable
}
// Ensure ASP exceptions
MRole role = MRole.getDefault(ctx, false);
if (role.getWindowAccess(vo.AD_Window_ID) == null)
if (vo != null && role.getWindowAccess(vo.AD_Window_ID) == null)
vo = null; // Not found
if (vo == null)
{
CLogger.get().log(Level.SEVERE, "No Window - AD_Window_ID=" + vo.AD_Window_ID
CLogger.get().log(Level.SEVERE, "No Window - AD_Window_ID=" + AD_Window_ID
+ ", AD_Role_ID=" + AD_Role_ID + " - " + sql);
CLogger.get().saveError("AccessTableNoView", "(Not found)");
return null;