added action StopAllTrains, added null checks

This commit is contained in:
Stephan Richter
2020-11-08 22:36:12 +01:00
parent b899572f55
commit 2b03c08fa1
9 changed files with 30 additions and 14 deletions

View File

@@ -9,7 +9,7 @@ public class FinishRoute extends Action {
@Override
public boolean fire(Context context) throws IOException {
Route route = context.route;
if (route != null) route.finish();
if (isSet(route)) route.finish();
return true;
}
}