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

@@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>de.srsoftware</groupId>
<artifactId>web4rail</artifactId>
<version>0.9.19</version>
<version>0.9.20</version>
<name>Web4Rail</name>
<packaging>jar</packaging>
<description>Java Model Railway Control</description>

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 {