Fix out of memory crash with map generation
This commit is contained in:
parent
713b86d2fb
commit
4526ae6426
1 changed files with 4 additions and 2 deletions
|
@ -124,8 +124,10 @@ public class TransportRoute extends MapObject {
|
||||||
if(reverseSecond) {
|
if(reverseSecond) {
|
||||||
second.reverseNodes();
|
second.reverseNodes();
|
||||||
}
|
}
|
||||||
for (int i = 1; i < second.getNodes().size(); i++) {
|
if (first != second && (first.getId() < 0 || first.getId() != second.getId())) {
|
||||||
first.addNode(second.getNodes().get(i));
|
for (int i = 1; i < second.getNodes().size(); i++) {
|
||||||
|
first.addNode(second.getNodes().get(i));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
changed = true;
|
changed = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue