diff --git a/src/com/rjconsultores/ventaboletos/dao/hibernate/SisdapHibernateDAO.java b/src/com/rjconsultores/ventaboletos/dao/hibernate/SisdapHibernateDAO.java index 9b4bb2711..7a709fc73 100644 --- a/src/com/rjconsultores/ventaboletos/dao/hibernate/SisdapHibernateDAO.java +++ b/src/com/rjconsultores/ventaboletos/dao/hibernate/SisdapHibernateDAO.java @@ -225,7 +225,8 @@ public class SisdapHibernateDAO implements SisdapDAO { Boolean achou = Boolean.FALSE; if(isIda(ms)) { for (MovimentoSecoes ms2 : listResultConsulta) { - if(ms.getLocalOrigem().equals(ms2.getLocalDestino()) && ms2.getLocalOrigem().equals(ms.getLocalDestino()) && !isIda(ms2) && ms2.getPrefixo().equals(ms.getPrefixo())) { + if(ms != null && ms2 != null && ms.getLocalOrigem() != null && ms2.getLocalOrigem() != null && + ms.getLocalOrigem().equals(ms2.getLocalDestino()) && ms2.getLocalOrigem().equals(ms.getLocalDestino()) && !isIda(ms2) && ms2.getPrefixo().equals(ms.getPrefixo())) { ms.setDescontoIdosoVolta(ms2.getDescontoIdosoVolta()); ms.setGratuidadeIdosoVolta(ms2.getGratuidadeIdosoVolta()); ms.setDescontoIdosoIda(ms2.getDescontoIdosoIda()); @@ -257,7 +258,8 @@ public class SisdapHibernateDAO implements SisdapDAO { Boolean achou = Boolean.FALSE; for (MovimentoSecoes idaVolta : listResultIdaVoltaInvertida) { - if(idaVolta.getLocalOrigem().equals(volta.getLocalDestino()) && volta.getLocalOrigem().equals(idaVolta.getLocalDestino()) && volta.getPrefixo().equals(idaVolta.getPrefixo())) { + if(idaVolta != null && idaVolta.getLocalOrigem() != null && volta != null && volta.getLocalOrigem() != null && volta.getPrefixo() != null && + idaVolta.getLocalOrigem().equals(volta.getLocalDestino()) && volta.getLocalOrigem().equals(idaVolta.getLocalDestino()) && volta.getPrefixo().equals(idaVolta.getPrefixo())) { achou = Boolean.TRUE; } }