Fix NPE
This commit is contained in:
parent
746e8ed800
commit
57bea7dbc9
1 changed files with 4 additions and 1 deletions
|
@ -194,9 +194,12 @@ public class TransportStop extends MapObject {
|
||||||
((this.exits == null && thatObj.exits == null) || (this.exits != null && thatObj.exits != null && this.exits.size() == thatObj.exits.size()))) {
|
((this.exits == null && thatObj.exits == null) || (this.exits != null && thatObj.exits != null && this.exits.size() == thatObj.exits.size()))) {
|
||||||
if (this.exits != null) {
|
if (this.exits != null) {
|
||||||
for (TransportStopExit exit1 : this.exits) {
|
for (TransportStopExit exit1 : this.exits) {
|
||||||
|
if(exit1 == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
boolean contains = false;
|
boolean contains = false;
|
||||||
for (TransportStopExit exit2 : thatObj.exits) {
|
for (TransportStopExit exit2 : thatObj.exits) {
|
||||||
if (exit1.getId().equals(exit2.getId())) {
|
if (Algorithms.objectEquals(exit1, exit2) ) {
|
||||||
contains = true;
|
contains = true;
|
||||||
if (!exit1.compareExit(exit2)) {
|
if (!exit1.compareExit(exit2)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue