This commit is contained in:
Stephan Richter
2020-11-03 23:39:18 +01:00
parent 596317049c
commit ba0658f368
2 changed files with 6 additions and 4 deletions

View File

@@ -540,9 +540,11 @@ public class Route implements Constants{
}
if (endBlock.route() == this) endBlock.lock(null);
if (startBlock.route() == this) startBlock.lock(null);
train.heading(startDirection);
train.block(startBlock, false);
if (train.route == this) train.route = null;
if (train != null) {
train.heading(startDirection);
train.block(startBlock, false);
if (train.route == this) train.route = null;
}
}
public static void saveAll(Collection<Route> routes, String filename) throws IOException {