Fix out of memory crash with map generation

This commit is contained in:
Victor Shcherb 2020-05-11 18:20:48 +02:00
parent 713b86d2fb
commit 4526ae6426

View file

@ -124,8 +124,10 @@ public class TransportRoute extends MapObject {
if(reverseSecond) {
second.reverseNodes();
}
for (int i = 1; i < second.getNodes().size(); i++) {
first.addNode(second.getNodes().get(i));
if (first != second && (first.getId() < 0 || first.getId() != second.getId())) {
for (int i = 1; i < second.getNodes().size(); i++) {
first.addNode(second.getNodes().get(i));
}
}
changed = true;
} else {