X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fxdcc%2Fui%2Fstdin%2FCommandReader.java;h=c278ea54b9f3c84ab38a430e0092d7402f80b776;hb=4b537b2d4a5b2aec431e0faeb801cc62a741a465;hp=c78697af36b5da5212cce430f4882c13b36a3a40;hpb=6cbb85f8a94ac3f413b3ac4f24c8f67d43acaa21;p=xudocci.git diff --git a/src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java b/src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java index c78697a..c278ea5 100644 --- a/src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java +++ b/src/main/java/net/pterodactylus/xdcc/ui/stdin/CommandReader.java @@ -160,8 +160,8 @@ public class CommandReader extends AbstractExecutionThreadService { } } else if (words[0].equalsIgnoreCase("cancel")) { Integer index = Ints.tryParse(words[1]); - if ((index != null) && (index < lastResult.size())) { - core.cancelDownload(lastResult.get(index).bot(), lastResult.get(index).pack()); + if ((index != null) && (index < downloads.size())) { + core.cancelDownload(downloads.get(index).bot(), downloads.get(index).pack()); } } else if (words[0].equalsIgnoreCase("stats")) { int configuredChannelsCount = core.channels().size();