Queue: correct removal of queued command by type.
This commit is contained in:
parent
a0a60ea2d6
commit
682b56198a
|
@ -96,7 +96,7 @@ public class CommandQueue {
|
|||
}
|
||||
|
||||
private synchronized void removeAll(Command.CommandType type) {
|
||||
for (int i = 0; i < queue.size(); i++) {
|
||||
for (int i = queue.size() - 1; i >= 0; i--) {
|
||||
if (queue.get(i).commandType == type) {
|
||||
queue.remove(i);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue