mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[commands] Fix RepeatCommand calling end() twice (#5261)
This commit is contained in:
@@ -63,7 +63,12 @@ public class RepeatCommand extends CommandBase {
|
||||
|
||||
@Override
|
||||
public void end(boolean interrupted) {
|
||||
m_command.end(interrupted);
|
||||
// Make sure we didn't already call end() (which would happen if the command finished in the
|
||||
// last call to our execute())
|
||||
if (!m_ended) {
|
||||
m_command.end(interrupted);
|
||||
m_ended = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user