mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 09:01:08 +03:00
[FIX] JLine complete NPE
This commit is contained in:
parent
2ff46420a8
commit
600dd02703
1 changed files with 3 additions and 0 deletions
|
@ -77,6 +77,9 @@ public void complete(LineReader reader, ParsedLine line, List<Candidate> candida
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Command target = findCommand(line.words().get(0));
|
Command target = findCommand(line.words().get(0));
|
||||||
|
if(target == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
List<String> words = line.words();
|
List<String> words = line.words();
|
||||||
List<Candidate> candidates1 = target.complete(words.subList(1, words.size()), line.wordIndex() - 1, completeWord);
|
List<Candidate> candidates1 = target.complete(words.subList(1, words.size()), line.wordIndex() - 1, completeWord);
|
||||||
candidates.addAll(candidates1);
|
candidates.addAll(candidates1);
|
||||||
|
|
Loading…
Reference in a new issue