IDEMPIERE-3895 NPE in fitnesse login fixture when wrong username

This commit is contained in:
Carlos Ruiz 2019-02-16 11:33:39 +01:00
parent ad0ffe1fbf
commit 10f834d36a
1 changed files with 7 additions and 5 deletions

View File

@ -167,11 +167,13 @@ public class Login extends TableFixture {
KeyNamePair[] clients = login.getClients(m_user, m_password);
boolean okclient = false;
KeyNamePair selectedClient = null;
for (KeyNamePair client : clients) {
if (client.getKey() == m_client_id) {
okclient = true;
selectedClient = client;
break;
if (clients != null) {
for (KeyNamePair client : clients) {
if (client.getKey() == m_client_id) {
okclient = true;
selectedClient = client;
break;
}
}
}
if (!okclient)