Commit 97c7f970 authored by Daniel Lehmberg's avatar Daniel Lehmberg
Browse files

bugfix, nullpointer exception

parent 373740b7
Pipeline #146879 failed with stages
in 59 minutes and 55 seconds
......@@ -159,11 +159,13 @@ public class Pedestrian extends Agent {
}
public void clearFootSteps() {
// Last is always the most recent (made sure in VTrajectory.add)
// getLast() is always the most recent (made sure in VTrajectory.add)
// This statement is for security and should mostly have no effect (only if someone did not use method
// "addFootStepToTrajectory" to add another foot step to the trajectory)
currentFootStep = trajectory.getFootSteps().getLast();
trajectory.clear();
if(!trajectory.isEmpty()){
currentFootStep = trajectory.getFootSteps().getLast();
trajectory.clear();
}
}
// Overridden Methods
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment